How to make a custom "404 error" page!

A "404" is an error message you get when you follow a link to a web-page that doesn't exist. By default this error message is a web-page created by your web-host provider.
Did you know that you can customize this web-page? This will keep you from losing viewers when you delete a page or mess up a link ... funneling those "lost souls" back into your site. This is especially important for search engines ... you don't want to lose all that SE traffic when you move a page!
Directions
  1. Open a text editor (Windows notepad will do), and copy the following onto the first line:

    ErrorDocument 404 /error-page.html

    Now, save the file onto your hard-drive as a text file (.txt) and name it ".htaccess.txt". Yes, I know that is a weird file name, but that first period is necessary. We'll rename the file after we upload it.
  2. FTP to your web-site's root directory (where your homepage is located) with a program like WS-FTP. Copy the above file into the main directory of your site.
    note: Be sure to upload in "ascii" and not "binary" format.
  3. Rename ".htaccess.txt" to plain old ".htaccess"
  4. Finally, create a custom web-page with your html editor, name it "error-page.html", and upload it into your root directory.

Comments

Popular posts from this blog

PHP 5.4 beta1 released

how to check whether element is visible on screen

How to check browser cookie enabled with php and javascript