Custom 404 Page Tutorial



This article has two parts
PART 1: Checking and creating
PART 2: Uploading the files and common errors

Why do I need a custom 404 page?



Imagine that you have misspelled a link on your site or a link to you in another website is written incorrectly. If a visitor clicks on it, he'll end up with the rather unfriendly "404 File not found" message and he'll be most likely to hit the back button and not visit your site again, or just plainly close the window. Now, if you have your custom 404 page, the visitor will get redirected to it. There, you can inform him in a warm and friendly way that the page doesn't exist and provide a link to the main page. That way, the visitor understands that he's still on the same site. So, by creating a custom 404 page, you'll manage to keep most of the visitors that go to a url of your site that doesn't exist. Furthermore, custom 404 pages, give your website a more professional look and feel.

How do I make a custom 404 page?



First of all,you have to find a host that supports .htaccess. Paid hosts are most likely to have this feature enabled, but the only free hosts that support it as far as I'm concerned, are: Portland, Fragism. The host must give you access to FTP as well, because if you upload the .htaccess file by browser, it's not very likely to work. Portland and Fragism give you FTP access, so they're nice free hosts if you want to create custom 404 pages. You DON'T need to have your own domain to do that.

After finding a host that fits your needs, you need to create a file called .htaccess. Use a text editor, such as Windows Notepad, and paste the following line without writing anything else in the file(without the colors, which are here to help you, obviously!):

ErrorDocument 404 http://www.yourdomain.com/errorpage.html

Replace the "www.yourdomain.com" with your own domain or subdomain or subdirectory and the "errorpage.html" with the page you want the visitors to get redirected to. Then save the file as .htaccess(note the dot at the front).Most likely, you'll have to name it .htaccess.txt, but you can rename it later using the FTP.

Now,you have to create you error page. It is just a simple HTML document.It should contain a small message -"we apologize for the inconvenience" and other advanced stuff don't seem to keep visitors on your site. Trust me, I've tried and lost them everytime. Quickly give them a sitemap or suggest that they search your site. You should always enable visitors to search through your site anyway.

On to Part 2:
Uploading the files and common errors

This article has two parts
PART 1: Checking and creating
PART 2: Uploading the files and common errors


Copyright 2002 - 2006 by Tomb Raider 4U

Privacy Policy
eXTReMe Tracker