404 Error Pages: What Are They And How Do You Create One?


We've all seen them, you've been browsing a website and you click a link and nothing loads apart from the words '404 Error' along with the usual stuff.

So what is a 404 Error page? The 404 Error page, basically informs the user that the server cannot find the file they are looking for. However, instead of using the default 404 Error page you can create your own, this is how you do it.

First, you need your .htaccess file which should be within your web site directory. If you cannot find it you will need to create one. You will have to contact your host asking them how you would go about creating or editing this file. They may want you to use a text editor and then upload it, or they may want you to use a PICO editor and create or edit the file on the server.

How you have access to the .htaccess file lets edit it. Add this line to the .htaccess file:

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

Make sure this line is kept on online. This is where your 404 Error page is kept.

Now you've change the .htaccess file you need to create the page. This is simply a normal HTML document. Once you've created the HTML document, save it and call it 404page.html. Now the next step is to upload the .htaccess file and the page to the server.

Now that is done your next step is to turn it on. This is done by setting the CHMOD attribute to 644. You can do this via telnet or some FTP programs. If your going to telnet into your server, use the following command:

chmod 644 .htaccess

Now test to see if it's worked. Just go to a page that doesn't exist on your server and you should see your new 404 Error page. If not, then make sure the CHMOD is set correctly, and if that doesn't help, you may want to ask your hosting company for support.

About The Author

I currently own and run a small E-commerce template website located at http://www.sjh-designs.co.uk. You can find several more guides located at http://www.sjh-designs.co.uk/guides.htm.







Related News



Tech Mahindra’s future, sans BT - Livemint

Tech Mahindra’s future, sans BT
Livemint, India -4 hours ago
Here are some figures: on 23 June 2006, personal loans constituted 27.33% of total non-food credit outstanding, while credit to the infrastructure sector ...

Jews aim to use tech tactics to counter anti-Obama 'rumor mill' - Ha'aretz

Jews aim to use tech tactics to counter anti-Obama 'rumor mill'
Ha'aretz, Israel -Aug 26, 2008
"It's micro-targeting, it works through your personal network ? the activists are just getting tools to do it effectively". "Technically, it's pretty simple ...
Jewish Obama backers to fight rumorsPolitico
all 22 news articles

Here, there, everywhere . . . where am I? - Atlanta Journal Constitution

Here, there, everywhere . . . where am I?
Atlanta Journal Constitution,  USA -9 hours ago
My thoughts are increasingly disjointed as I wind down my final few days covering Tech as there are a lot of loose ends to tie up professionally, etc., ...

Security With Advanced Technology and PepperBall Technologies ... - CNNMoney.com

Security With Advanced Technology and PepperBall Technologies ...
CNNMoney.com -Aug 26, 2008
Security With Advanced Technology, Inc. is a provider of high-tech security products and services, which include non-lethal personal protection devices, ...

McCain Outlines Technology Policy - Broadcasting & Cable

McCain Outlines Technology Policy
Broadcasting & Cable, NY -8 hours ago
The tech policy section of the site also suggests McCain will favor personal responsibility and technological fixes for controlling content. ...

N-Power announces Tech Pragati scholarships - Economic Times

N-Power announces Tech Pragati scholarships
Economic Times, India -8 hours ago
Scholarships upto 50% of the course fees will be awarded to meritorious students on the basis of their performance in an aptitude test and a personal...

Tech Weekly: Windows 7 and location based services - guardian.co.uk

Tech Weekly: Windows 7 and location based services
guardian.co.uk, UK -13 hours ago
Is the trend towards personalisation encroaching on our personal privacy, or will it break down the boundaries, and make the web work for us all? ...

Personal Tech: ABCs of online security - Salt Lake Tribune

Personal Tech: ABCs of online security
Salt Lake Tribune, United States -Aug 12, 2008
Boulder, Colorado - More than 18 million college students will head back to school this fall and nearly every one of them owns a personal computer. ...

Personal Tech: iPhone just got smarter - Salt Lake Tribune

Personal Tech: iPhone just got smarter
Salt Lake Tribune, United States -Aug 19, 2008
By Vince Horiuchi "Crash Kart,"a Mario Kart-like driving game, is shown running on Apple's new iPhone 3G. With all the hoopla over the iPhone 3G and its new ...


TECH BLOG One Less Windows User - LinuxInsider.com

TECH BLOG One Less Windows User
LinuxInsider.com, CA -12 hours ago
By Jason Z. Cohen After nearly five years, I needed to update my personal computer. My old Dell Inspiron has long since been rendered quaint by advances in ...