Click to See Complete Forum and Search --> : Custom 404-page
truly_hacking
November 22nd, 2002, 05:56 PM
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 ?
coolnads
November 22nd, 2002, 05:59 PM
Yooo keep it on truly
truly_hacking
November 22nd, 2002, 06:02 PM
lol thanks, im glad it was of help to you
*SerialCookie*
November 22nd, 2002, 06:33 PM
Thanks for that!
linuxelite
November 22nd, 2002, 07: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.
slarty
November 22nd, 2002, 09: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?
linuxelite
November 22nd, 2002, 09: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.
bluebeard96
November 23rd, 2002, 12:54 AM
20% of traffic through there? I'd try fixing my links before creating a custom 404 page.
truly_hacking
November 23rd, 2002, 09: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.
Thanks
P.S. - it is really unhelpful when you see people negging you even on this one.
bluebeard96
November 23rd, 2002, 12:26 PM
truly_hacking...
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.
truly_hacking
November 23rd, 2002, 01:38 PM
thanks blue, now i figure that you got mah point :)
it's very important that you dont lose users on your website, whatever else happens
whenever ive been to a website and saw a link that 404 page now found, id go to the homepage directly and then try searching here and there.
What you can do more is , give them a page nearer to what they might be looking for.
It's a lil hard work, but ya bet it pays.
bluebeard96
November 23rd, 2002, 01:51 PM
truly.... I did indeed get the point
yes, I do the same... try the root and see if I can find the "updated" link. Unfotunately most end-users don't do that, and that's why it IS important to capture them on the site if they get a 404 and try t at least point them in the direction. I definitely see you point, and, like I said earlier, it is something that I need to do on my own sites.
Ratman2
November 23rd, 2002, 01:55 PM
I made use of this tutorial on a site to make my own custom page. Thanks for the info :D.
ZeroOne
November 23rd, 2002, 04:57 PM
If I was to make this tutorial, I would have just posted a message to the Web Development forum with a link to the page with those instructions, perhaps with a little quote from it. I would have also explained some more ways to use the .htaccess -file. THIS (http://www.javascriptkit.com/howto/htaccess.shtml) is what *I* call a tutorial.
ebo
November 23rd, 2002, 05:32 PM
Yeah, i have to say that this is not the most impressive tutorial in the world, but since you wrote it i guess i have to give you some credit. It would be better if it had some more info in it. Go around and look at other tutorials, that people loved and greened, they are like 3 pages all together. The Java Tutorial by Jethro is what a real tutorial really looks like. Well, i hope you put in some more effort in your next tutorial.
truly_hacking
November 24th, 2002, 04:56 PM
hello ebo,
well im surprised at the amount of debate this tutorial has caused rather than gaining information from it. Let me make somethings clear :
I did not write this tutorial to gain greenies.
I did not write this tutorial so that i can have one under my name
Well, i simply enough put forth what i knew and told it to everybody.
please for god sake, people, i dont understand why you're neggin me on this one.
Take it easy, if ya dont like, rest your a**
Somebody negs me and sayz " these are paragraphs not tutorials"
man, i think we are here at AO not to discourage people like that, i think you should look at the positive point of it and let go, that's all
Or if you think there's something lacking, just tell meh, cuz there aint no point in flamin me
Thanks, just by the way
coolnads
November 24th, 2002, 05:07 PM
its an OK tut will work for the beggineers but thoes who think that they are at altar of everything can just skip this one......
some more info culd be put to good use though.
isnt it that most of the info that comes as quoted in .htaccess is more than enough. just askin coz it was sufficient for me.
coolnads
February 22nd, 2003, 07:54 PM
what the **** i did not post the above post i repeate i did NOT .... i come to this site post afew replys and go back... i come back after few minutes and see myself replying stupidly to every other post on the block and getting negative points....... i got three negative points in a span of an hour could the moderators plz look into this i m gona post this stuff in another thread too, where some how i have my name in it.