Results 1 to 4 of 4

Thread: Make Your Wordpress 404 Pages NoIndex and NoFollow

  1. #1
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts

    Make Your Wordpress 404 Pages NoIndex and NoFollow

    One of my sites had a software bug last year where two plugins could not get along nicely -- which resulted in about 100k nearly content-free pages being indexed by Google. These pages still show up in Google Webmaster Tools and that's starting to be annoying. They show up as being linked from search pages -- search pages which themselves no longer exist.

    Google isn't being quick about forgetting about these pages, but here's a nifty trick that I am hoping will help. I have added the following code snipper to the <head> section of header.php:

    Code:
    <?php if( is_404() ) { ?>
     <meta name="robots" content="noindex,nofollow" />
    
    <?php } ?>
    This automatically adds noindex and nofollow to all of my 404 pages. I'll know in a few weeks whether it does the trick.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  2. Thanked by:

    Shenron (24 March, 2011)

  3. #2
    TopDogger's Avatar
    TopDogger is offline Über Hund
    Join Date
    Jan 2009
    Location
    Hellfire, AZ
    Posts
    3,106
    Thanks
    350
    Thanked 919 Times in 703 Posts
    Interesting approach.

    Which two plugins created the problem?

    I've seen pages that no longer exist linger in Google for up to four years, even when they are generating a valid status code 404. The problem is that Google has to check the page before it will see the robots tag or does anything about it. If GoogleBot no longer finds links with that URL, it can take some time. I hope yours get cleared out sooner than four years.

    Keep up updated.
    "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- Benjamin Franklin


  4. #3
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    Quote Originally Posted by TopDogger View Post
    Which two plugins created the problem?
    It was just a version mismatch -- upgrading one plugin caused an incompatibility until the other plugin released an upgrade.

    Quote Originally Posted by TopDogger View Post
    I've seen pages that no longer exist linger in Google for up to four years, even when they are generating a valid status code 404. The problem is that Google has to check the page before it will see the robots tag or does anything about it. If GoogleBot no longer finds links with that URL, it can take some time. I hope yours get cleared out sooner than four years.

    Keep up updated.
    After months of annoyance, my "Not Found" pages in Google Webmaster Tools fell from around 90k to just 13,446 -- and I am hoping for the rest to drop in the next few days.

    My thinking is that this could be very important after the recent Farmer/Panda update.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  5. #4
    Shenron's Avatar
    Shenron is offline Administrator
    Join Date
    Dec 2008
    Location
    Portugal
    Posts
    1,900
    Blog Entries
    2
    Thanks
    561
    Thanked 548 Times in 368 Posts
    This is indeed very interesting as I keep getting those for the same reason, but now I need to hire someone to update all my sites' header.php file...

Similar Threads

  1. Get Wordpress to Load Pages Faster
    By Kim in forum Wordpress
    Replies: 4
    Last Post: 11 October, 2010, 12:18 PM
  2. Nofollow and Noindex Tags for Wordpress Archive
    By jAlpari in forum On-Site SEO
    Replies: 9
    Last Post: 17 March, 2010, 15:26 PM
  3. NoFollow Links Really are NoFollow
    By Will.Spencer in forum Promoting
    Replies: 8
    Last Post: 15 January, 2010, 09:06 AM
  4. Make search engine friendly pages
    By mega in forum Promoting
    Replies: 0
    Last Post: 11 May, 2009, 00:50 AM
  5. Wordpress plugin needed for not displaying pages
    By Mr.Bill in forum Wordpress
    Replies: 5
    Last Post: 25 January, 2009, 22:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •