Google index wordpress media files - how to avoid ?

danhoff

Senior Member
Joined
May 11, 2010
Messages
800
Reaction score
62
For each media file (images) i upload WP creates subpages in my blog with just the image displayed. I think it's bad for my rankings, since there is no real content. How can i switch this off ?
 
Use Robots.txt file.

Disallow: /wp-content/uploads/

By the way, it doesn't effect for rankings.
 
Either simply delete your attachment.php file OR
Add this to the top of your header file (haven't tested this. try and let me know):


Code:
if(is_attachment()) 
      header("HTTP/1.0 404 Not Found");

Beware!! Your attachment won't show anymore..
 
Back
Top