12th May 2008

In SEO : custom error 404 page

[from the HTTP error “file not found on server”] Extended to humans to convey that the subject has no idea or no clue — sapience not found or the document you’ve tried to access can’t be located. This can happen when the page is moved, not uploaded, is misspelled or the URL people are clicking through is not formed properly. The first 4 indicates a client error such as a mistyped URL. The middle 0 refers to a general syntax error. The last 4 just indicates the specific error in the group of 40x, which also includes 400: Bad Request, 401: Unauthorized, etc.

Requirements for Customizing the 404 File Not Found Page

If your web host has not enabled the facility for your website to create 404 page then there is no possibility to customize 404 error page. Web host which provide this facility will already mention of this. Also if they mention that you can create “.htaccess” file (e.g. Apache web servers)it means that you can also make 404 File Not Found error page.

Creating the custom page itself isn’t difficult. It is just an HTML file saved with any name.
Little extra work is require to get your custom page to show up on a 404 error. You will also need to be the one in charge of your web site, and it must be under your own domain name. If you do not have permission to do this, be sure to ask your web host before you proceed.

To start, there are some steps to follow:

  1. Go to the main directory of your web site through FTP or Telnet.
  2. Look for a file there named .htaccess
  3. If you have the file, you will want to edit it. If you do not have the file, create a new text file and save it as “.htaccess”
  4. While creating a file if you are creating the file from scratch, type the following line into the file, changing the url to the location of your custom page:

    ErrorDocument 404 http://www.example.com/custom_page.html

    Keep it all on one line, with a space on each side of the number 404. Also, this is case sensitive, so be sure to check the case of the E and D in ErrorDocument before you proceed.

  5. If you already have the file and need to edit it, look for a line like the one above. If it is there, you can just change the url. If you do not have the line, add it in after everything else on its own line.
  6. When you are done, upload your new .htaccess file to the server. Then, be sure to use the CHMOD command through your FTP or telnet program to set the permissions to CHMOD 644. Also be sure that you have uploaded your custom page to the server, otherwise you’ll get a 500 server error or something similar.
  7. Once that is done, then test it by typing a URL that you know does not exist.You should get your custom page, ready to bring in the lost visitors that may be out there.

You should make your 404 page larger than 512 bytes, even when you are testing. Otherwise Internet Explorer (IE) will load what it calls its built-in “friendly HTTP error message” instead of your 404 page.

Common Errors with a 404 Custom Error Page

  1. Some times people make error while customizing their page is putting a wrong url in their .htaccess file. When user trying to access a missing file the web server goes in to loop.
  2. Your 404 Error Page may be loaded either from the main directory or from a subdirectory or even your CGI-BIN directory. When you put links on your 404 Document Not Found page be sure that you use the full URL and not a relative link. That is, use things like
    < a href="http://www.example.com/sitemap.html" >Site Map< /a > instead of
    < a href="sitemap.html" >Site Map < /a >

Spread the word: bookmark it/readit

This entry was posted on Monday, May 12th, 2008 at 2:19 am and is filed under SEO/Search Engine News. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Spread the Word
delicious
digg
technorati
reddit
magnolia
stumbleupon
yahoo
google
  • Subscribe

  • Add to Google
  • Add to My Yahoo!
  • Subscribe with Bloglines
  • Subscribe in NewsGator Online
  • Add to Technorati Favorites!
  • Feedburner Reader
  • Get free E-Book on blogging

  • Online Marketing
  • RSS


eXTReMe Tracker