Forums > Build, Make or Create your own Website > How to Create a Custom 404 Page
|
When you are looking at your website design, you may like to consider creating your very own custom 4040 page. Does this look familiar?
"Not Found
The requested URL was not found on this server.
Apache/1.3.31 Server at www.example.com Port 80"
We have all seen that too many times while looking around the Web. And if you are like most people you just hit the back button and try another website. Why not make a custom 404 page that is friendly for your website visitors and gives them a way back to more familiar, or at least not lost, territory.
These tips won't work for windows servers, but are perfect for Unix hosts.
Step 1 - Create the .htaccess
To begin open up your .htaccess file if you already have one, if not open notepad or your favorite text editor (No, a WYSIWYG editor won't work here) and add this line:
ErrorDocument 404 /404.php
You can name your error file whatever you would like and use whatever extension you are most comfortable with.
Step 2 - Create the Custom 404 page
Create a file called 404.php (or whatever you wrote in your .htaccess), add whatever you want your visitors to see when they hit a missing page. A sitemap or search is nice, along with letting them know the file they requested is not available.
Step 3 - Upload
Make sure your FTP program is set to upload as ASCII, upload the 404.php, then the .htaccess.
Step 4 - Check it
Make sure your browser cache is clear and type in a file you know does not exist on your server. You should be seeing your new, and much more welcoming 404 page.
Step 5 - Double Check it
This is important, make sure your custom 404 is actually sending a 404 header! The best way is using the Firefox extension called Live Http Headers. It shows you the entire conversation between your browser and the website. Again, type in a file you know does not exist on your page, it should say 404 Not Found, not 200 OK. If you have images on your 404 page, those will show code 200 which is exactly what you want because they are there, so scroll to the top of the header testers output and read carefully. The page itself should send a 404. If it is showing a code 200, remove the .htaccess and try again. The last thing you want is for the search engines to see a 200 response code for a page that does not really exist.
View More: [ 01 ][ 02 ] |
| Build a web site | Website Management Technology | Website Services |
|
|
|
|
| Website CMS Solutions | Website CMS Applications | |
|
|
|
|
| Business Opportunities | Customer Service | Company |
|
|
|
|
Website design by AJIBOYE. Website powered by ASD Website Automation CMS+ v. 3.06.00
© Copyright. AJIBOYE. All rights reserved