When you think ASP, think...
Recent Articles xml
All Articles
ASP.NET Articles
Related Web Technologies
User Tips!
Coding Tips
spgif spgif

Sample Chapters
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Stump the SQL Guru!
XML Info
Author an Article
spgif spgif
ASP ASP.NET ASP FAQs Feedback topnav-right
Print this page.
Published: Monday, June 14, 1999

Creating a Custom 404 Error Page

Have you ever noticed that some sites give you a nice looking page when you mistype a URL, as opposed to one of those nasty 404 File Not Found errors. Would you like to add one of these pages to your site? It's really easy with IIS 4!

- continued -

Custom 404 Errors First, open up Internet Service Manager and right click on the website that you want to set the custom 404 Error for. Click on Properties and then choose the Custom Errors tab. Scroll down until you get to the 404 HTTP Error. You'll notice on the right that it has the filename that is associated with the 404 status listed. You can edit this file directly, if you like, or choose a new file (by choosing Edit Properties).

Now you may be wondering, "What is a good 404 error page?" Well, you probably should want to tell the visitor in English terms that they've reached a URL that does not exist. You should also provide a link back to the main page, and, if you want to be real slick, have yourself sent an email so that you know a user encounted a 404 error. Here, if you're still out of ideas, check out what happens when you try to visit a non-existing page: try it out!

You can also specify that a user be taken to a specific URL when a 404 error is encountered. To do this, when you click on Edit Properties, you can specify a URL.

Notice that there are a number of other HTTP Errors that you can customize.

From an end-user standpoint, there's nothing worse than receiving a 404 error. It usually means they will mosey on to another site. By providing a custom 404 error message, you increase the chances of the surfer giving your site another chance.

404 URL Choice
Happy Programming!

ASP.NET [1.x] [2.0] | ASPFAQs.com | Advertise | Feedback | Author an Article