Share |
Web Server Error Messages

by Tadas Talaikis
Posted on April 18, 2004



When visiting websites, you can find a lot of uncanny 401, 404, 403 error pages. What do they mean?

400 - Bad file request. It means file exist on server, but wrong syntax used to get that file.

403 - Access denied. It means you need a username and password to enter this area or owner of site has some blocking of your IP or method you use.

Tip #1. For example, someone wants to use 'Web Downloader' to browse my site offline or just seeks illegally extract data from my site, I enter in .htaccess file (it sits on your website public html directory) few lines:

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^Web Downloader [NC]
RewriteRule ^.*$ blocked.html [L]


... and this 'visitor' gets 403 error, and is being redirected to my custom blocked.html page.

404 - File not found. File does not exist on server. Maybe owner changed address or deleted that file.

Tip #2. If you came from Google, you can see that file by clicking 'page cache'. If file is older than one month, you can try to locate it on Web Archive http://www.archive.org.

500 - Internal server error. It means there is a problem with server side script or server has configuration errors.

Tip #3. How to keep your visitors on your site when they get error files? Create your custom error files! And then add few lines into your .htaccess file:


ErrorDocument 404 http://www.your-domain.com/404.html

When page not found I like to use redirecting to main page instead of custom 'not found' page. Here's example:

ErrorDocument 404 http://www.zongoo.com ErrorDocument 403 http://www.zongoo.com/blocked.html

Article by Tadas Talaikis, software engineer, self-help guru, and owner of http://www.zongoo.com. Drop me a note if you need help.








Print This Article| Send To A Friend| RSS Feeds|Read More Related Articles

COMMENT ON THIS ARTICLE...


First name: Website: (Please include http://)





No comments yet. Be the first one to comment.

Follow me    E-mail     Comments (0)

Share     Text    RSS Feed    Print



Post them now in our forums for quick, helpful advice from thousands of members!



Get all the latest webmaster tips and tricks from some of the brightest minds in the online world delivered right to your inbox with the Site-Reference Newsletter

Last name:
First name:


e-mail:


Your privacy is 100% Guaranteed. Easily unsubscribe at any time



Drive traffic to your business and get recognized as an industry leader by sharing your knowledge on Site-Reference. Authors are given a wide range of exclusive benefits here at SR; so checkout what we can offer to those that…



We’re always on the lookout for new writing talent so even if haven’t written for the web yet, feel free to contact us anytime