1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest Last month we upgraded BlackHatWorld.com to a new platform - . If you notice anything that requires attention please start a new thread here.
    Dismiss Notice

Google index wordpress media files - how to avoid ?

Discussion in 'Black Hat SEO' started by danhoff, Jan 30, 2013.

  1. danhoff

    danhoff Power Member

    Joined:
    May 11, 2010
    Messages:
    760
    Likes Received:
    55
    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 ?
     
  2. Kazi_Haque

    Kazi_Haque Regular Member

    Joined:
    Aug 13, 2010
    Messages:
    325
    Likes Received:
    425
    Occupation:
    Internet Marketing
    Location:
    Melbourne, Australia
    Use Robots.txt file.

    Disallow: /wp-content/uploads/

    By the way, it doesn't effect for rankings.
     
  3. Gogol

    Gogol Elite Member

    Joined:
    Sep 10, 2010
    Messages:
    3,002
    Likes Received:
    2,852
    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..