• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Michele Neylon :: Pensieri

Michele Neylon :: Pensieri

Technology, Marketing, Domains, Thoughts

Telling Google that pages are gone

September 17, 2006 by Michele Neylon 10 Comments

Until recently I was under the impression that search engine spiders conformed to “sane” standards. If a page returns a HTTP status code of 404 you would have thought that the page / link would be removed from the index.
Seemingly this is not the case…
I’ve now been advised that I should try to use either a 410 status code
There are some interesting differences between the two HTTP responses:

10.4.11 410 Gone
The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete references to the Request-URI after user approval. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead. This response is cacheable unless indicated otherwise.
The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer working at the server’s site. It is not necessary to mark all permanently unavailable resources as “gone” or to keep the mark for any length of time — that is left to the discretion of the server owner.


While the good old 404 response code is defined as:

10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.


That’s a bit of a head wrecker.
I suppose if you know exactly which pages you want to remove, then a 410 response code is easy enough to generate, but in my case it isn’t. I’d either have to change the 404 page to a 410 for the entire site, or simply wait it out.

Related Posts:

  • computer-code-screens
    Dodgy WordPress Developer Tactics
  • privacy-keyboard-keys
    My Privacy Has Been Sold
  • Dirty Dancing Synced to the Muppet Show Theme is Perfect
    Dirty Dancing Synced to the Muppet Show Theme is Perfect
  • distance-traveled
    The Irish Postal Service Failed Me!
  • paramount-plus-screenshot
    Paramount+'s UI Makes me Sad
  • taylor-swift-vs-trump
    Could Taylor Swift Decide the US Presidential Election?

Filed Under: Techie :: Techno ::

Michele is founder and CEO of Irish hosting provider and domain name registrar Blacknight. Read More…

Reader Interactions

Comments

  1. adam says

    September 17, 2006 at 4:39 pm

    Generate a list of pages you want to return 410 for, push not found through mod_rewrite to PHP, consult the list from there and return 410 if there’s a match.

  2. michele says

    September 17, 2006 at 4:48 pm

    Sounds complicated 🙁

  3. Rob says

    September 17, 2006 at 5:14 pm

    Depending on the popularity of the page in question you may be waiting a VERY long time. One approach would be to use mod_perl or mod_python to catch the offending requests in apache’s dispatch phase and return 410 then; probably a little simpler than mucking around with mod_rewrite.
    In general, Google does stick to the letter of the standards; this has caused trouble before, with the Google Web Accelerator thing getting confused about sessions, for instance.

  4. adam says

    September 17, 2006 at 5:25 pm

    Not really. The only problem is that you can’t use Apache’s ErrorDocument, as the status is already set by the time it gets there; so you need to push /everything/ through mod_rewrite. That isn’t as bad as it sounds though, the overhead isn’t really that heavy unless the site is /very/ large and busy.
    So you’d use a mod_rewrite setup quite similar to WordPress, like this:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /410handler.php [L]
    Then you’d put the list of pages you want to return 410 status into a text file, one per line, and create 410handler.php like this:
    That’s it, unless the missing pages are in WordPress; in which case you’d drop the mod_rewrite stuff and do the same thing as an extension.

  5. adam says

    September 17, 2006 at 5:26 pm

    WordPress killed the PHP, let’s try it without tags.
    $pages = file(‘410pages.txt’);
    foreach($pages as $page) { // can’t use in_array() because of the line break
    $page = trim($page);
    if ($page == $_SERVER[‘REQUEST_URI’]) {
    header(“HTTP/1.0 410 Gone”);
    }
    }

  6. Anthony says

    September 18, 2006 at 9:18 am

    What about IIS? We’ve recently overhauled dublin.ie and all links from google are now returning 404. I’d rather return 410

  7. adam says

    September 18, 2006 at 1:24 pm

    Migrate to LAMP. 🙂

  8. Rob says

    September 18, 2006 at 3:39 pm

    For Dublin.ie, it might make more sense to have sensible permanent redirects to (approximately) the right places. You can do that in IIS, right?
    Alternatively, it’s always better to leave things where they are if possible. I’m currently replacing a PHP site with one written in Common Lisp; it may end up with .php extensions for this reason 🙂

  9. Hugh says

    September 18, 2006 at 4:18 pm

    You could just use Google’s url removal tool

  10. adam says

    September 20, 2006 at 2:25 am

    Here you go Michele:
    Which Google Webmaster Tools Do You Want?
    Google’s Matt Cutts told me he’ll be reading along for inspiration, so who knows, your wish might trigger something…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

dotblog founder

Mastodon

Archives

  • Bluesky
  • Instagram
  • Threads
  • Twitter

Pages

  • About Me
  • About This Site
  • Archives
  • Comments Policy
  • Contact Me
  • Newsletter
  • Privacy

Blogroll

  • Technology.ie Podcast
  • Tom Doyle
  • Damien Mulley
  • Paul Savage – BlackDog SEO
  • Stewart Curry

Stalking Links

Subscribe to Michele Neylon :: Pensieri

Blogroll

  • Blacknight Blog
  • Damien Mulley
  • Gianni Ponzi
  • Gordon Hudson
  • Grandad
  • My Mastodon
  • Paul Savage – BlackDog SEO
  • Stewart Curry
  • Technology.ie Podcast
  • Tom Doyle

Sites

  • Business Travel Tips
  • Discount Coupon Codes
  • Domain News
  • Fat.ie – my diet blog
  • Film Posters
  • Film Reviews
  • Films
  • Free Desktop Wallpapers
  • Irish Blogger Discussion Forum
  • Irish Stamps
  • Movie Trailers and News
  • Paste.ie

Footer

Site hosted in Ireland by Blacknight - Content copyright Michele Neylon

Copyright © 2025 · Magazine Pro on Genesis Framework · WordPress · Log in