The problem began in November 2015. Usually I was using Yoast SEO plugin & it was working nice. One day I thought to using All In One SEO plugin because of its ranking. So i disabled Yoast SEO on my tech site www.pcmobitech.com & installed All in One SEO plugin. After setting up All in One SEO, I activated XML Sitemap function in All In One SEO features manager and after enabling submitted the sitemap into Google Webmaster. Then i didn’t know about Media/Attachments page. After two days I checked my site into search results by using site:www.pcmobitech.com then i saw many URL’s that look like actual post URL’s. Indexed by Google Search. Oh my god it was approx 200+.
Why my site Media attachments pages indexed by Google?
I shocked. After this i searched about these pages & found these are Attachments pages & when we insert any images then WordPress creates an additional page for every image. This page only contains Image Title & Image. These pages are low quality because there is no text on these. Therefore my site faced the Google Panda penalty and two days later my traffic was down. I do not understand what I had made a mistake. I check and found i only installed All In One SEO plugin with in 3 days & All In One SEO Sitemap option Media/Attachments has occurred the problem.
So immediately uninstalled All In One SEO & again activated Yoast SEO. But the attachment URL’s were still in the Google search and how to removed them?
Note: If you are using All in One SEO pack then don’t enable Media/Attachments sitemap option otherwise your site will get Google Panda Penalties.
After Searching more, I found if we redirect attachments page to parent post URL then the problem could solved. Because I was using yoast seo plugin. Therefore there was no need to use another plugin. I went to Yoast Setting- SEO>>Advanced>>Permalinks>> Click to Enable Redirect button of the Redirect attachment URL’s to parent post URL. >>click on Save Changes Button.
Now it was necessary to wait for a few days, because Google will take some time to remove these URL’s from the search results. but how much?
Attachment URLs redirection will not remove any URL from The Google Search.
After the two months of waiting all Attachments URL’s still remain in the search results. It is to bad. Even after these redirection URLs, Google why not removed. It was a big question for me. So then I tried to delete them manually by using Remove URL option in Google Webmaster. But after removing manually after a while these URLs again indexed into search. It was too serious problem. But one day i was just checking Yoast Setting – SEO>>Titles & Metas>>Post Types. Here under the Media option i saw a Media Warning & the warning was:
As you are redirecting Attachment URLs to parent post URLs, these settings will currently only have an effect on unattached media items! So remember: If you change the attachment redirection setting in the future, the below settings will take effect for *all* media items.
Update: In Yoast 3.1 they have Replaced all checkboxes and radio buttons on settings pages with styled toggles & now Post types Media option look like this:-
How to Remove Attachments URLs from the Google Search-
And finally I got my answer in the Yoast setting: mean if we redirect attachment URL to parent post URL then Yoast will not add a meta Robots: noindex, follow tag on Attachment pages & the setting only have an effect on Unattached media item (eg your home page attachment images) that you have on insert in to the post. By default Media option set on noindex, follow. If it is not then Tick the Meta Robots: noindex, follow checkbox & click on Save changes button.
Now go to Yoast Setting- SEO>>Advanced>>Permalinks>> untick the check box: Redirect attachment URL’s to parent post URL. >>click on Save Changes Button.
Now my problem is resolved & gradually Google is removing attachment URL’s from the search results. but one thing is cleared that Google will not remove old URLs from the search Unless you’ll not add a noindex, follow tag on those URLs. Yoast SEO plugin is great solution for every wordpress blog unless you don’t have full knowledge about Search Engine optimization (SEO).
I hope it will also work for you.