Forum Moderators: phranque

Message Too Old, No Replies

How to change the Default 404 Error Page

         

iGLOBAL NiCK

9:51 am on Oct 11, 2009 (gmt 0)

10+ Year Member



I was wondering if there was a way to change the default 404 error msg. that pops up on my site when I type in a page incorrectly, it displays my webhosts error msg. with ads or links to other sites, do you guys know what I am talking about like if I deleted a .html page but it still remains in the search engines and people click on them and end up getting a 404 msg. saying the page no longer exists, I want to create my own 404 msg. that has links to other pages on my site instead of the webhosts generic 404 msg. with links to other sites...How can it be done? Thankyou!

wyweb

10:21 am on Oct 11, 2009 (gmt 0)



Add this to your htaccess file:

ErrorDocument 404 http://www.example.com/404.html

Where example.com is your own domain name and 404.html is the file name of your custom error page.

iGLOBAL NiCK

10:27 am on Oct 11, 2009 (gmt 0)

10+ Year Member



You rock man, I appreciate that! I will test this out shortly...Take it easy!

iGLOBAL NiCK

10:40 am on Oct 11, 2009 (gmt 0)

10+ Year Member



I am trying to find the htaccess file through my ftp program but its not listing it, even with files hidden being shown its not there. Do I even have one? I'm not sure, lol. If I were to create one, what would the full name be? I know what your talking about I have seen that file before, but for some reason its not appearing so I can't edit it.

phranque

12:29 pm on Oct 11, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], iGLOBAL NiCK!

try naming it .htaccess

iGLOBAL NiCK

6:52 pm on Oct 11, 2009 (gmt 0)

10+ Year Member



What should I use to save the file as? I know in notepad it tries to save it as a .txt file, what editor should I be using? I tried to make my own .htaccess file but wasn't successful.

wyweb

7:25 pm on Oct 11, 2009 (gmt 0)



If you're using notepad, put the entire file name in quotes before you save it.

iGLOBAL NiCK

8:14 pm on Oct 11, 2009 (gmt 0)

10+ Year Member



So your saying in notepad, save it as ".htaccess" ?

iGLOBAL NiCK

8:18 pm on Oct 11, 2009 (gmt 0)

10+ Year Member



It worked! I made my own .htaccess file with the script mentioned for 404 and now it re-directs to my own 404 page! Awesome you guys! Thanks again for the help!

effectsdude79

9:06 pm on Oct 29, 2009 (gmt 0)

10+ Year Member



usually if your site has an FTP server that the 404 error html file is stored on, you can simply make another one and upload that in its place. mine was called 404.htm