A Wordpress BUG and How You Can Fix it

20
9.1K followers
Updated

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.

Login
Create Your Free Wealthy Affiliate Account Today!
icon
4-Steps to Success Class
icon
One Profit Ready Website
icon
Market Research & Analysis Tools
icon
Millionaire Mentorship
icon
Core “Business Start Up” Training

Recent Comments

26

Thanks for the info.

Thanks for your post. Oh, so many things to learn!

Very useful Rufat. Thank you.

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.

lol I know what you mean I will double check and see what I can find out thank you

I asked Kyle today and as soon as I have an answer to your question I'll add to my present blog post

thank you I appreciate it

Something else I've learnt today, thanks! :)

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

It won't help. It tried it.

Ok worth a try I suppose

Barry

Thanks for sharing this information. It will help.

Glad it helped.

Great info... I had seen this problem last week and was wondering if there was a fix. Thank ya'!

See more comments

Login
Create Your Free Wealthy Affiliate Account Today!
icon
4-Steps to Success Class
icon
One Profit Ready Website
icon
Market Research & Analysis Tools
icon
Millionaire Mentorship
icon
Core “Business Start Up” Training