Help - Search - Members - Calendar
Full Version: Making Your Very Own Custom 404 Page (not Found)
Zymic Webmaster Forums > Zymic Free Web Hosting > Tutorials
Pages: 1, 2
Jacob
A cool trick you can entice your visitors with is custom error pages. When a page on your server is not found, your visitors will normally see their browser's default message such as "Page cannot be displayed." If you used a custom error page though, your visitors will see your page.

404 Error pages will ONLY work if you are using it on a domain. Sub-domains (something.your-site.com or http://www.your-site.com/something) will NOT work.

Here's How:
1. Create an HTML file for your 404 page. It could be anything you would like. It could be just simply 404 on a blank page.. or it could be your layout that includes the 404 words in it.. it's all up to you.
2. Save that file in any file format you want (html, php etc;) and upload it to your webserver. You can either keep it in your main or root directory, or you can create a subfolder. If you're only going to be using one (404) then I suggest just leaving it in your root folder.
3. Press start > Run > type "notepad" (in mac, just open a text editor) now you will take this code below, and put it into your text editor:
CODE
ErrorDocument 404 http://www.yoursite.com/404.htm

4. Remember, change the URL in the above code to the path of your 404 page on your server.
5. Now file > save as > htaccess.txt | save it somewhere that you will remember.
6. Upload the htaccess.txt folder to your webserver. (Make sure it's in the home or root directory)
7. Rename the file (will be different for different ftp clients) to .htaccess (make sure there is a "." before htaccess and NO ".txt" after htaccess)
8. And there you go! You should be good to go. There are also other error pages available such as internal error, forbidden etc; search google for these .. and then its just a matter of adding that code to your .htaccess file and making another error document (like your 404 page).

Any questions?

Jacob.
alandu
Nice tutorial, but I have a problem.

I know you said I can't create error pages with sub domains...

Then how come I found a website that can do it with sub domains:
http://kingsnetwork.myvnc.com/

So if you typed http://kingsnetwork.myvnc.com/blahblah8y4235234

It comes with an customised error page.

And I can't! =[

Please help.

Thanks.
Brandon
i was going todo a tutorial on this sad.gif
wozzym
wow thats a lot simpler than I thought.
DJPazze
Thanks for the info! (tutorial)

Simple, simple, simple!
Yaveo
so, this wont work on zymic? or will it ??
swordz
This will work on zymic servers.

swordz
Jacob
So instead of getting a generic 404, you can have it jazzed up and to the theme of your site!

Jacob.
Andrew-C
is there anyway that this could be setup so if say vndv was down i could host it on another server and it would say please go here.
wozzym
if vndv is down your site can't be accessed. the page will just expire...so no.
Passion
Great Tutorial

Keep Providing more.. smile.gif
burgly
I know nothing of Html, Php, Mysql, and I'm new to Zymic, but I do know logic.
So, couldn't you add a seperate Htaccess File for your subdomain?
Sickness
you can also create a page for "when the server is too busy" but it's a different number, and I don't remember which one it is.
swordz
500.13. A full list is here. And there's far more than I thought there were...

swordz
caseymadaline
Nice tutorial. It looks pretty simple. I'll give it try.
estuartie
Hiya - great tutorial -I always wondered how it was done - so it's time to play around some more!!
Thanks
Stu

Does anyone have the code to do a small shoutbox that will fit into a sidebar just so people can leave comments on the site
cheers
Stu
byluiz
ty
IamShipon1988
I never really had to create so many error pages. I just set my servers language to Chinese for fun. It was great.
tomming
You can also try htaccess editor (www.htaccesseditor.com/en.shtml)
easy..
MASTER MIST
i can't use mine for some reason this is ticking me off ~.~ i thought i could use this place for a page for me and my friends to have our favorate stuff
MrTouz
Just an other tip :

If you want to use images in your 404 it is suggested to put the full path of the image http://www.mysite.com/images/404.png for example and not images/404.png.
It sounds logical and not logical at the same time for me..but oh well.
MH-Dolly
thanks! I will use it when I go home!
MicJames
That is really useful and well explained, thanks!
akpokemon
Thank you so much! How cool! biggrin.gif

But I have a problem! sad.gif I made an error on my first .htaccess file, and after I renamed it, it became invisible on Filezilla. sad.gif Then when I followed these steps again to get a working .htaccess file, it wouldn't let me rename my htaccess.txt file to .htaccess in the FTP. It says:
CODE
550 RENAME Failed - destination file already exists

Well, snap. tongue.gif

Could someone please tell me how to delete the existing .htaccess file so I can replace it with the working one? Thank you! biggrin.gif

--akpokemon

EDIT: Sorry for the smilies overload.
Roee
QUOTE(akpokemon @ Dec 23 2008, 12:14 AM) *
But I have a problem! sad.gif I made an error on my first .htaccess file, and after I renamed it, it became invisible on Filezilla. sad.gif Then when I followed these steps again to get a working .htaccess file, it wouldn't let me rename my htaccess.txt file to .htaccess in the FTP. It says:
CODE
550 RENAME Failed - destination file already exists

Well, snap. tongue.gif

Could someone please tell me how to delete the existing .htaccess file so I can replace it with the working one? Thank you! biggrin.gif


You can use the "File Manager" in your account control panel and delete the file from there.
akpokemon
QUOTE(Roee @ Dec 23 2008, 02:03 PM) *
You can use the "File Manager" in your account control panel and delete the file from there.


Oh...jk. Not compatible with sub-domains. Wow. Ha. Okay. Thanks, though!

Would it work if I got a free domain like co.cc or something like that?

Thanks
M-Optimizer
I don't know why it doesn't work for me.
Abdes Samad
If it will work, all would be nice biggrin.gif
myjunkie
Great tutorial! biggrin.gif
primatage
PROBLEM:

Several people have posted asking why this does not work with free hosting accounts here on zymic, and yet no one has answered them.

Can somebody PLEASE help us all? Why won't the file manager allow upload of any file resembling an htaccess file to any folder besides root?

I for one would be extremely grateful to anyone who can clear this up for the people that the tip didn't miraculously work for.
Sir Graystar
This doesn't really work for me. If I get a 404 error straight from the root directory (e.g mysite.com/rg4325) then it goes to the uuuq 404 page, but if I get one from index.php (e.g mysite.com/index.php/rg4325) then it does work. Help anyone?
Jenniferlinn
QUOTE(NaRzY @ Jul 18 2008, 09:46 AM) *
A cool trick you can entice your visitors with is custom error pages. When a page on your server is not found, your visitors will normally see their browser's default message such as "Page cannot be displayed." If you used a custom error page though, your visitors will see your page.

404 Error pages will ONLY work if you are using it on a domain. Sub-domains (something.your-site.com or http://www.your-site.com/something) will NOT work.

Here's How:
1. Create an HTML file for your 404 page. It could be anything you would like. It could be just simply 404 on a blank page.. or it could be your layout that includes the 404 words in it.. it's all up to you.
2. Save that file in any file format you want (html, php etc;) and upload it to your webserver. You can either keep it in your main or root directory, or you can create a subfolder. If you're only going to be using one (404) then I suggest just leaving it in your root folder.
3. Press start > Run > type "notepad" (in mac, just open a text editor) now you will take this code below, and put it into your text editor:
CODE
ErrorDocument 404 http://www.yoursite.com/404.htm

4. Remember, change the URL in the above code to the path of your 404 page on your server.
5. Now file > save as > htaccess.txt | save it somewhere that you will remember.
6. Upload the HTACCESS.TXT folder to your webserver. (Make sure it's in the home or root directory)
7. Rename the file (will be different for different ftp clients) to .HTACCESS (make sure there is a "." before HTACCESS and NO ".txt" after HTACCESS)
8. And there you go! You should be good to go. There are also other error pages available such as internal error, forbidden etc; search google for these .. and then its just a matter of adding that code to your .htaccess file and making another error document (like your 404 page).

Any questions?

Jacob.



Hello Jacob

Thanks for the tutorial , let me try it on my machine then i will be back with my feedback
farhome
oo this is what i'm looking for. by the way i guess we can do this is Cpanel, is it not?
alicia8522
Excellent information - thank you. I will definitely recommend your post to my friends. Nice trick !
Jacob
QUOTE(farhome @ Jun 7 2009, 05:13 PM) *
oo this is what i'm looking for. by the way i guess we can do this is Cpanel, is it not?

cPanel accounts (Zymic does not currently provide) does have the error pages module installed and is easily customisable.

Jacob.
Jacob
Just for the record, this has been tested and works fine on Zymic servers. You just need to make sure all files are correctly named and uploaded before attempting to test it.
lynndalton
Hey...
Thanks for providing such a wonderful stuff. Its really informative thread. This is interesting issue, Hope many members get more information through this thread.... smile.gif
jordan k hu
Works on my subdomain!
True
Hi, This has not worked for me. I did exactly how it said and it still comes up with the zymic 404....any reason why that comes up. My .HTACCESS file ( named exacltly that) says: "ErrorDocument 404 http://true.zxq.net/404.html" Without quotes. I uploaded it and renamed to .HTACCESS And then i tested ......it comes up with http://www.hosting.zymic.com/404/

And i want it to come up with:

http://true.zxq.net/404.html


Any help?
Thanks
True
Ed
QUOTE(True @ Dec 22 2009, 10:35 AM) *
Hi, This has not worked for me. I did exactly how it said and it still comes up with the zymic 404....any reason why that comes up. My .HTACCESS file ( named exacltly that) says: "ErrorDocument 404 http://true.zxq.net/404.html" Without quotes. I uploaded it and renamed to .HTACCESS And then i tested ......it comes up with http://www.hosting.zymic.com/404/

And i want it to come up with:

http://true.zxq.net/404.html
Any help?
Thanks
True


Needs to be all lowercase: .htaccess
True
Thanks alot ed!


True
Mattyski
Thanks for the 404 Tip.
Now to find out if it can be used as a hit counter?...


Matt
ssfdre38
make sure you name it .htaccess and not .HTACCESS for it to work
sherryabhy
you can also generate a page for "when the server is busy" but it is a different number, & I don't keep in mind which one it is. I will share its information latter on here.
kamlanegi
Hi,

I think 404 error is the Error message when our webpage is permanently remove. If i am worng then help we.
Its good one but need more explaination..


Regards,
Kamla Negi
ssfdre38
make an .htaccess file and in it you add ErrorDocument 404 path/to/404
ielts7band
hi!

i want to know that would i have to make the individual custom error pages for all 404 error pages?
Black Eagle
The code can be working on the whole site, so you'll be having one 404 error page, just add a path to it.
sharunks007
Thanks a lot!!! biggrin.gif
It's working on my custom domain too ^.^
shnooky
Thanks for the help, the steps seem alot easier than I had expected.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.