Notice: There is no legacy documentation available for this item, so you are seeing the current documentation.
We often get asked about whether to include Media Attachments in the XML Sitemap or whether to set them to NOINDEX.
This article will address questions related to Media Attachments and how they affect your site SEO.
What Is A Media Attachment?
A Media Attachment is a type of content that is built into WordPress. It’s a special page that displays a media item, such as an image, along with some additional information.
When you add a media item to your content, you have the option to link the media item to its Attachment Page as shown in the screenshots below:
When a visitor clicks on the image, they are taken to the Attachment Page which displays the image title, the image, a caption and/or description (if set), and the comments form (if comments are enabled).
How Would I Use Attachment Pages?
Because an Attachment Page is a standard WordPress post type, it has a theme template file that allows you to control what content is displayed and how it looks.
A good example of this would be a photography theme that uses the Attachment Page to display EXIF data for the photo, such as the make and model of the camera, and the camera settings (ISO, Exposure, Shutter Speed, etc). It could also display geographical information of where the photo was taken.
What Are The SEO benefits?
For most sites there are no SEO benefits from Media Attachments. This is because these pages have little to no content on them, they just show the image title, the image itself and that’s all. Why would a visitor want to visit or search for this page? Answer: they wouldn’t!
However, some sites will use Media Attachments to display rich content about the image, such as our example above of a photography site. In this case, you probably want visitors to be able to find this content in search engines. The rich content on these pages could be valuable for your ability to rank for specific terms, and therefore there is great benefit in terms of your overall site SEO.
What Should I Do?
If your Media Attachments contain no rich content, then you should click on Search Appearance in the All in One SEO menu and then click on the Media tab.
You’ll see the first setting is Redirect Attachment URLs to the Attachment Itself. Set this to Enabled if you don’t want Media Attachments to appear in search results.
However, if your Media Attachments contain rich content that visitors would want to find in search engines, then set Redirect Attachment URLs to the Attachment Itself to Disabled.
You should now see the Show in Search Results setting and this should be set to Yes.
Won’t This Affect Indexing Of My Images?
No, this has no affect on images. This only affects Media Attachments.
Images will still be included in the XML Sitemap provided you don’t check the Exclude Images setting.
Images will still be indexed provided the search engine feels that there’s a benefit to including your images in their image search results. Search engines such as Google may not index any or all of your images, so don’t be surprised if your images don’t appear in their image search.