Redirect Attachment Pages for SEO? Read This First!

Last month Yoast added a feature to their Yoast SEO (aka WordPress SEO) plugin to allow redirecting attachment pages to the media itself (image, video, PDF, etc). For example, an attachment page with an image would be redirected to the full size image. The reason given by Yoast is that attachment pages are simply an HTML wrapper around an image, and provide little to no value for SEO.

This may be true IF the attachment page does not include any Schema markup — either as JSON-LD or microdata — to provide Google (Bing and Pinterest too) with information about the media, AND you’ve not entered a title, caption, alternative text, and description for your media in the WordPress Media library (if you haven’t, you really should).

And if you’re using the WPSSO Core plugin with its WPSSO Schema JSON-LD Markup add-on, for example, you probably would NOT want to redirect attachment pages to the media file — you’ll just be throwing away all that awesome SEO markup about the media. ;-)

What about sharing attachment page URLs vs image URLs?

Whether your attachment page has Schema markup or not, one thing is certain — if you want to share an image on social sites, you should share the attachment page URL, not the media file URL (image, video, PDF, etc).

For example, a shared JPEG image URL does NOT bring potential customers back to your site — it’s just an image. A shared image URL is shown on social sites as an image — without a link back to a page on your site, without a title, and without a description. You can enter additional text in the social post itself, but that text is easily lost when the shared is re-shared — you’re much better off sharing an attachment page URL, which will link back to your site. ;-)

For example, let’s compare sharing an attachment page URL and an image URL on Facebook:

A Facebook share example using an attachment page URL.

A Facebook share example using an attachment page URL — the share is linked back to the attachment page (on your site), and includes a title with a description.

A Facebook share example using an image URL.

A Facebook share example using an image URL — the share is linked to the image file, and does not link back to a page (on your site), nor does it show a title or description.

As you can see, the shared attachment page URL contains more information, and links back to the attachment page — definitely a better option than sharing a simple image URL.

2 thoughts on “Redirect Attachment Pages for SEO? Read This First!

  1. Um…shouldn’t you share the actual article you want people to read, rather than the attachment page? Most images are, after all, uploaded to a post, page, or other entry, and if you share that post, page, etc. to social media, the featured image will appear in the social share.

    You certainly have a point about the Schema/JSON-LD data, but I’m not sure that seeing an attachment page, which doesn’t have much on it besides the image and the title, is going to draw people into going deeper into your website.

    • Thanks for your comment :-) Yes, absolutely! Sharing a post / page with content is much better, but this post is about WordPress attachment pages specifically — redirecting attachment pages to their media (as Yoast SEO suggests), and sharing attachment pages vs sharing the media URL itself. ;-)

      The attachment page is also a template, so can be styled to include / exclude menus, sidebars, and related content. The WordPress Media library also provides a description field for all media, which is equivalent to the post / page content area — perfect for shorter texts specifically about that media. ;-)

      For example, the attachment page can be used to provide more information about media, which may not be relevant / desired when writing a post / page with that media added to the content or used as a featured image.

Comments are closed.