A Wordpress BUG and How You Can Fix it
Hi, I guess most of you probably don't know that there is a bug in wordpress. When you add an image to your post, wordpress automatically creates a separate attachment page for your image. Here is an article if you want to read more about this problem.
http://www.ampercent.com/prevent-indexing-wordpress-image-attachment-pages/9082/
This is exactly what I faced a few days ago and had to spend hours to fix the problem.
It is a common problem for wordpress and happens to any wordpress site. As a result of that I had a problem with my sitemap. When I logged into my Google webmaster account and checked my sitemap.xml it did show all my pages, i.e. actual post pages and useless attachment pages, i.e. 105 actual pages and 304 attachment pages!!!
I searched the web and found that there were a lot of complaints from bloggers. And it is not only wordpress problem. I don't understand why Google bots crawl and index my or someone's attachment pages???
How you can fix the problem:
1. Install Yoast SEO plugin and check the box shown on the image
If there is an option in the Yoast SEO plugin for redirecting attachment URLs to parent post URLs that means this problem does really exist.
2. If you have ALL in One SEO plugin installed and don't want to remove it and install Yoast SEO plugin then you can install another plugin "Attachment pages redirect" and activate it and the plugin will do all the work for you. It will redirect all your attachment pages to your parent (post) pages.
Finally, after installing it, make sure that you tweet any of your post directly from your website and then go to your twitter account and click on your tweeted post to make sure that it takes you directly to your post page on your website, not attachment page.
Recent Comments
26
This is very interesting. Thanks for sharing. I have all in one SEO on most sites but Yoast on another. I am liking it better and better.
Another new thing to consider, however can we have too many redirects... maybe I should think about changing to yoast
Yoast does same redirect. As for can we make too many redirects or not, I don't really know. But if Yoast does it, that means it shouldn't be a problem I think. I would ask Kyle but can't because I asked him a question via PM and so I can't ask another one until I receive a reply to the first one.
I asked Kyle today and as soon as I have an answer to your question I'll add to my present blog post
There is simple way to solve this
Click on image - click the pencil icon takes you to image edit page
where it says (link to) there are 4 options
1. Media file
2. Attachment page
3. Custom URL
4. None
Select none and your good to go I think this will help as well
Barry
Great info... I had seen this problem last week and was wondering if there was a fix. Thank ya'!
See more comments
Thanks for the info.