Crawl Issues in Google Search Console
Came across this error when we were checking once of our sites. Apparently it was affecting over 200 URLs’ in that site and this was affecting that site’s rank in the SERPS.
This error affects websites designed using WordPress. One of WordPress features is that it automatically creates an Attachment URL (a blank web page) for every image that is uploaded to the site.
Problem is when Google finds those pages, your ranking takes a dive because of the sudden increase in the number of pages, with no increase in content. This can cause your site to be hit with Google penalties and drop down the ranks.
How Yoast SEO is Involved
Yoast Seo, a WordPress SEO plugin has a setting which redirects those pages directly to the images itself. Unfortunatly, there was a bug in one of their updates where that setting was disabled. This caused Google to discover those attachment URLs. Read more about that and how Yoast has addressed the problem.
Remove the Attachment URLs’ from Google Search Console
Yoast has already fixed the bug with an update but the damage has already been done in Google. So first priority is to get Google to remove those URLs from their record. This process usually takes months as Google slowly updates their records. Yoast created another plugin called Search Index Purge to fix this problem fast.
Purge The Results
Download and Install the Search Index Purge from Yoast.
Check Created Sitemaps
Go to SEO and check the Sitemaps.
You should have a new “Attachment” Sitemap added.
Removing Old Sitemaps
Login into Google Search Console and delete any old sitemaps.
Then add the new sitemap in Google Search Console..
More about attachment pages and what they are.
Separate media pages may work for photographers, artists, and graphic designers, as they help to create galleries and sliders. But for standard WordPress users, it makes sense to redirect WordPress attachments pages to the posts or pages that they rightly belong to. As a bonus, your site’s SEO may improve.
Finally, learn how to redirect attachment pages to original post or page.