What does redirecting attachment URLs mean?
When you upload an image or other attachment to WordPress, your site automatically creates a dedicated page for that file. In most cases, those pages don’t look great, and can cause ‘thin content’ problems when you have lots of them. That’s definitely something you want to prevent!
That’s where the Yoast SEO plugin comes in. With Yoast SEO you can automatically redirect attachment page URLs to the actual image, preventing thin content on your site!
Easily redirect attachment pages!
- Prevent thin content on your site
- Limit the number of excess pages on your site
Warning: Undefined array key 2 in /home/staging-yoast/staging-platform.yoast.com/versions/b6ab6cc77e40bc2acc362da080d5dcf3b4ac2281/core-yoastcom/Integrations/Theme/Blocks/Video_Embed_Lazy_Load.php on line 109
What are attachment URLs?
An attachment URL (also called an attachment page or media page), is a page WordPress automatically creates when you upload an attachment (say for example an image) to your site. These attachments are stored in the database as posts, which makes them accessible under their own URLs.
The page that these URLs display usually contain nothing more than the embedded image, your theme header, sidebar, and footer. Which often doesn’t look that attractive, as most sites have not customized these pages.
Why should I redirect my attachment URLs?
Other than the fact that these URLs often lack a well-thought-out design, they also increase the number of pages on your site. Pages that don’t have any purpose other than hosting an image or other attachment uploaded to your site. And because these pages are nothing more than one attachment, search engines might see them as thin content which isn’t beneficial to your rankings.
✅ To prevent thin content on your site
As mentioned earlier, these URLs often contain nothing more than the attachment itself. And this can result in thin content and with it less quality content on your site. We can imagine that this is something you want to avoid, as you should! Because search engines don’t like thin content and having more of it can hurt your rankings. That’s why we recommend redirecting your media URLs to the media itself.
✅ To limit the number of excess pages on your site
This might feel obvious, but by redirecting your attachment URLs you’re also keeping your number of unnecessary pages down. As this redirect feature makes sure every attachment is redirected to the attachment itself, and for WordPress this cancels the need to create a new page for every new attachment uploaded. This helps you stay in control of the size and structure of your site.
How Yoast SEO redirects your attachment URLs
So, how can you redirect these URLs and prevent WordPress from creating a page with every new image you upload? Leave that to us! With Yoast SEO you can enable a feature that will automatically redirect all these URLs for you. After you download and configure Yoast SEO (Premium or free), you can click on SEO in the menu on the left side of your Dashboard, click on Search Appearance and go to the Media tab on the page displayed. You simply click ‘Yes’ in the toggle button displayed in the image here and save your changes.
That’s all there is to it! This feature makes sure that your site won’t create a new page for every image or other attachment you upload from that moment on. This will benefit your SEO and keeps the number of unnecessary pages on your site to a minimum.
Let Yoast SEO help you win the search rankings
Discover all the features of the Yoast SEO for WordPress plugin.