November 22nd, 2002 04:56 PM
For Web Designers
How To Create a "Custom 404 Not Found" page
When we make a new website, you couldnt care less about keeping track of broken
links, missing pages etc. But as it grows, some pages are moved to new addresses,
some are deleted. People might still com to these pages from the search engines or
other links, but on arrival all they would see is this:
Error 404 - File Not Found
By the time a website becomes old, you will realize you might start losing visitors
The solution is : A custom 404 page!
Now, if someone comes to a webpage on my site that doesn't exist anymore, they will
see a special webpage that will direct them to wherever they want to go.
Follow these directions:
1. Open Notepad and type in this line:
ErrorDocument 404 http://www.yoursite.com/custom_page.html
Be sure to change the URL to your own custom "File Not Found" page.
Keep it all on one line, with a space before and after 404.
2. Save this file as ".htaccess" and upload it to your web server into the root directory
3. Use an FTP or telnet program to set the permissions to CHMOD 644.
There may be a case when you already have a file on your server called ".htaccess". In
that case you can simply add the line in step 1 after everything else in that file.
I found that my web sites get at least 20% of their traffic from that page.
Well, that really helps, doesnt it ?
November 22nd, 2002 04:59 PM
Better Laugh At Your Own Problems..
Coz...The World Laughs At Them
November 22nd, 2002 05:02 PM
lol thanks, im glad it was of help to you
November 22nd, 2002 05:33 PM
November 22nd, 2002 06:19 PM
Um, you might want to mention that this only works for apache. Some people don't use apache and might be confused as to which webserver this applies to.
November 22nd, 2002 08:33 PM
You might start by explaining what a 404 page is, why people want a custom one, and what web server and configuration parameters apply to this technique, i.e. Apache *if* the administrator has enabled custom errors in .htaccess
You're making assumptions once again by assuming they're running Windoze, hence "Open notepad". Why not open (for example), SimpleText instead? Why not just "Create a text file" - we should assume that web site authors can do that, right?
November 22nd, 2002 08:54 PM
And you might want to spruce it up a bit, add some info, I am no fan of 2 minute tutorials. It feels like abuse of the system. Maybe I'm wrong, and crazy, just saying. Anyways, just go back and edit this thing, and spruce it up a bit.
November 22nd, 2002 11:54 PM
20% of traffic through there? I'd try fixing my links before creating a custom 404 page.
November 23rd, 2002 08:54 AM
my dear bluebird.
i wasnt talking about 2 page websites, or more effectively, say 10, page websites
this is about business , e-commerce websites, when the count is so much you dont know how much..well i hope you know what i mean
Linuxelite, id be grateful if you make the change for me,and maybe, make a new post,
because i guess it is the best to my ability, and rest spyrul already added.
Im sad to feel that this might be an "abuse" to the system, but it is the best i could do, and in my knowledge, it is a tutorial, because it teaches something, 1 minute, 2 minute, or a 100 minute one.
I hope it helped people.
P.S. - it is really unhelpful when you see people negging you even on this one.
November 23rd, 2002 11:26 AM
I hear what you are saying, I jst believe that time would be better spent looking at where your 404s are coming from and fixing the linking problems. I do, however appreciate the tutorial. I have books tha explain how to do such, but you did a good job on letting people know hoe to create the 404 custom page, and that is commendable (that's why I, myself,
DIDN'T neg you).
You should, as your posted implied, do whatever you can to capture the 404s. Who knows, your custom 404 could point them to tyour main site and potentially increase your sales. Bottom line is that you don't want to lose visitors, especially when a simple 404 change can keep them on your site.
Your tutorial is actually something that I need to take care of on the few sites I administer, but most the 404s I get are trojans, etc.
23:27:57 21 Nov 2002 22 17,064 /robots.txt
03:20:41 17 Nov 2002 10 5,000 /scripts/..%255c%255c../winnt/system32/cmd.exe
10:59:34 11 Nov 2002 7 5,565 /_vti_bin/owssvr.dll
10:59:34 11 Nov 2002 7 5,565 /MSOffice/cltreq.asp
21:31:51 18 Nov 2002 6 4,896 /scripts/..%255c..%255cwinnt/system32/cmd.exe
13:18:26 20 Nov 2002 5 3,855 /sumthin
20:47:48 12 Nov 2002 3 2,340 /clients/main.htm
21:31:55 18 Nov 2002 3 2,427 /scripts/..%c0%af../winnt/system32/cmd.exe
21:31:49 18 Nov 2002 2 1,632 /scripts/.%252e/.%252e/winnt/system32/cmd.exe
21:32:01 18 Nov 2002 2 1,614 /scripts/..%c1%9c../winnt/system32/cmd.exe
Bottom line is that I'd rather see admins fixing improper links that creating custom 404s. With the way that crawlers and search engine archive pages, however, cutom 404s can help you contain vistors attempting to go to old links.
Custom 404s are a good thing, I'd just add in the fixing the links, if possible.
damn... it's 3:22am and by my typing anybody can tell that I've been drinking all night. How lame is this... I'm sitting at a bar reading a book on network intrusion detection! Good book for a beginner like me (Network Intrusion Detection, An Analysts Handbook", 2nd edition, by Northcutt and Novak.
Please forgive the typos in my message, i'm having a hard enough time reading the messages.