Go Back   Internet Business Forums > Design & Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 16-11-2006, 05:39 PM   #1
army
co-admin
 
army's Avatar
 
Join Date: Oct 2006
Location: Belgium
Posts: 666
Default [ Article ] Use 404-pages to your advantage

Custom 404 Pages

"Not found

The requested URL /file.html was not found on this server.

Apache/1.3.14 Server at www.yourdomain.com Port 80"

Does that look familiar? If you've ever accidentally tried to access a page that doesn't exist, possibly by following an outdated link or by misspelling the name of the page, you've probably seen something like the above appear on your screen. You might have attempted to correct the error by checking the URL for mistakes, but it is even more likely that you just clicked "Back" and returned where you came from, never visiting the site again.

For a surfer, encountering a "404 page" is a nuisance. For a webmaster, they can be far more problematic, causing a reduction in traffic which in turn means losing a part of the precious advertising revenues or sales the site's life depends on. You can minimize the amount of 404 errors by periodically checking your pages for broken links, but it is impossible to get completely rid of them. So, what can you do?

The solution - Custom 404 pages

The best way to avoid losing visitors to 404's is to replace the standard and unfriendly error message with a custom page. Fortunately the task is relatively simple and can be performed by anyone who owns a site that has its own domain name.

As different server softwares handle things in their own ways, there is no single method of creating a custom error page that works with every system. The following instructions can be applied by those who have sites hosted under Apache, which is a very widely used program. If you don't know what software your host is running, contact them and ask.

To start the process, use an FTP program such as CuteFTP to connect to your server. Search for a file named ".htaccess". Should you find it, download the file to your home computer for editing. If the file is not there, don't worry, you'll just have to create it yourself.

Grab a normal text editor and open the file, or if you don't have it, open up a blank file. Type the following into the first line of the file:

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

After you're done, save the file as plain text and make sure that it is named ".htaccess", without quotes of course. The hard part is now over, all that is left is to create the custom 404 page (404page.html) that loads when a 404 error occurs.

What should my 404 page look like?

Of course, you can put anything you want into it, but if your purpose is to encourage your visitors to click further into your site instead of leaving, the page should obey some basic principles.

1. Don't give users a reason to panic. Including a large heading that screams "ERROR" is likely to make the visitor feel that he/she has done something wrong or that your site is not working properly. A better approach is to first greet them with a warm welcome and then explain that the URL they were looking for could not be found, but should they browse around your site, they will surely find the information they need.

2. Make the page to look and feel similar to the rest of the pages on your site. Include your site's menu on the 404 page to give visitors a fast and easy way to continue exploring instead of clicking away. A well-designed 404 page with plenty of links is far more attractive than one that has just black text on a white background and a link to your homepage.

3. If you have the skills, consider adding a search feature on the page that allows people to search your site for matches. Often your navigation menu will provide a clue on how the user might reach the information he/she would like to see, but if it doesn't there is a great risk of losing the visit. Placing a search utility on the page increases the likelihood of the user finding the desired page and thus remaining on your site.

After both the .htaccess file and the HTML page are ready, FTP to your server, upload the pages and enjoy your new custom 404 error page!


You can find a .htaccess-tutorial here (posted by army)
army is offline   Reply With Quote
Old 02-12-2006, 01:33 AM   #2
DoomGuard
Senior Member
 
Join Date: Nov 2006
Posts: 119
Default Re: [ Article ] Use 404-pages to your advantage

woops , nice articles , great info .. really like it .. not bad . i will try it now ..
but it the server hide the .htaccess ? how do we do it ?
DoomGuard is offline   Reply With Quote
Old 02-12-2006, 05:45 AM   #3
Drew
www.mrgpt.com
 
Drew's Avatar
 
Join Date: Nov 2006
Location: 127.0.0.1
Posts: 201
Default Re: [ Article ] Use 404-pages to your advantage

Haha, check mine out :
http://quickgreen.net/404page.html

Unfortunately, my host doesn't support .htaccess files.
Drew is offline   Reply With Quote
Old 02-12-2006, 08:07 PM   #4
army
co-admin
 
army's Avatar
 
Join Date: Oct 2006
Location: Belgium
Posts: 666
Default Re: [ Article ] Use 404-pages to your advantage

What??? If you have a paid host, I would change immediatly!
Every decent host supports it.

But anyway ...

You first have to upload just the file, with another name, and then rename it to ".htaccess" since windows doesn't allow you to name the file like that.
army is offline   Reply With Quote
Old 04-12-2006, 03:52 AM   #5
edjackiel
Junior Member
 
Join Date: Dec 2006
Posts: 3
Default Re: [ Article ] Use 404-pages to your advantage

Good tutorial, but sometimes hosts ban the uploading of .htaccess files like Drew said. It might be they want to place ads on their .htaccess files, or they do not want people to password their directories, preventing them from easily patrolling them for abuse.
edjackiel is offline   Reply With Quote
Old 04-12-2006, 01:14 PM   #6
army
co-admin
 
army's Avatar
 
Join Date: Oct 2006
Location: Belgium
Posts: 666
Default Re: [ Article ] Use 404-pages to your advantage

Quote:
Originally Posted by edjackiel View Post
Good tutorial, but sometimes hosts ban the uploading of .htaccess files like Drew said. It might be they want to place ads on their .htaccess files, or they do not want people to password their directories, preventing them from easily patrolling them for abuse.
Yeah I know . But I don't like hosts that do that .
army is offline   Reply With Quote
Old 15-12-2006, 12:49 PM   #7
Aniket
The Webbie
 
Join Date: Dec 2006
Location: Bangalore,India
Posts: 72
Default Re: [ Article ] Use 404-pages to your advantage

Will use and see ,but my idea is ,if we can directly edit these error pages,
C PANEL gives such an option idonot know about th eothers
Aniket is offline   Reply With Quote
Old 15-12-2006, 06:14 PM   #8
army
co-admin
 
army's Avatar
 
Join Date: Oct 2006
Location: Belgium
Posts: 666
Default Re: [ Article ] Use 404-pages to your advantage

Quote:
Originally Posted by Aniket View Post
Will use and see ,but my idea is ,if we can directly edit these error pages,
C PANEL gives such an option idonot know about th eothers
Not everyone has cPanel .
And if you use 1 host, but you have different domains on that host... then you also have a problem . Then you need .htaccess .
Also for those who use a free host ...
army is offline   Reply With Quote
Old 15-12-2006, 06:25 PM   #9
atrocious
Junior Member
 
Join Date: Dec 2006
Posts: 17
Default Re: [ Article ] Use 404-pages to your advantage

I also put a link back to my site when visitors are directed to the 404 error pages. I learned about this feature some time back and I set up a page through control panel which said that the requested page was not found and there was a link on this text which took the visitor back to my site. I think that people can even put ads especially cpm ads on the error pages.
atrocious is offline   Reply With Quote
Old 24-12-2006, 11:24 AM   #10
shreesha
Senior Member
 
shreesha's Avatar
 
Join Date: Dec 2006
Posts: 136
Default Re: [ Article ] Use 404-pages to your advantage

hey nice tutorial. i'll try following it.
shreesha is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:50 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

All times are GMT +1. The time now is 10:50 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.