A good friend of mine who runs a web development blog recently sent me a great link to a post that describes the technical solution for notifying Google of website maintenance, which is important because if the Googlebot crawls through a link to a page on your website and gets a 404 error, it could seriously impact your search engine ranking.

The Most Common Scenarios for Broken Links

  • Website maintenance
  • Moving or renaming a web page
  • Typo in the anchor tag
  • Programming error

This is for those hosting on an Apache server not Windows.

There’s not a lot you can do if a website owner has a typo in their link to your website, other than notify them or update your .htaccess file with a Permanent Redirect (if the quality of inbound link warrants it).

However, if you are doing web maintenance, if you have a programming error, or if you have moved a page on the website, you can do something about it.

Companies without a lot of knowledge in SEO may rebuild a website with new/replacement pages without updating the .htaccess file to notify Google. The result: Traffic from Google stops completely (since all the cached URLs in the search results become broken). For moving a web page, simply put the line of code below into the .htaccess file on the root of your website. You’ll want to make sure the new URL and old URL are up before you post the code. After posting, remove the old page and use Google Webmaster Tools Keyword Removal Tool.


RedirectPermanent /page.html http://www.yoursite.com/new_page.html

If you are going to be doing web maintenance and don’t want Google to see a 404 error, here’s what you do:

The Retry-After response-header field can be used with a 503 (Service Unavailable) response to indicate how long the service is expected to be unavailable to the requesting client. This field MAY also be used with any 3xx (Redirection) response to indicate the minimum time the user-agent is asked wait before issuing the redirected request. The value of this field can be either an HTTP-date or an integer number of seconds (in decimal) after the time of the response.


Retry-After = "Retry-After" ":" ( HTTP-date | delta-seconds )

Two examples of using Retry-After:


Retry-After: Fri, 31 Dec 1999 23:59:59 GMT
Retry-After: 120

Read more about preventing 404 errors via AskApache.com.