How do I create a custom "Not Found" page?

Create a new text file on your computer and save it as ".htaccess".

If you are creating the file from scratch, simply type the following line into the file, changing the url to the location of your custom page:

ErrorDocument 404 http://www.YourWebSite.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.

When you are done, upload your new .htaccess file into the docs directory on the server. Make sure it's uploaded in ASCII format (not binary). Then, be sure to use the CHMOD command (this sets permissions) through your FTP or telnet program to set the permissions to 644.

Also be sure that you have uploaded your custom error page to the server, otherwise you'll get a 500 server error or something similar. Once that is done, you can test your new error page by typing in a url that you know does not exist on your site. You should get your custom page, ready to bring in the lost visitors that may be out there.

You cannot comment on this entry