CustomError FAQ
- Why should I customize my 404 and other server error messages?
- Why do I need CustomError if I can already create custom error pages in IIS?
- Does CustomError work in a hosted environment where several sites must share a single machine? How will it help an HSP?
- Why does CustomError provide 404 redirection control? Will that help my search engine rankings?
- Does CustomError work with ASP, ASP.NET, and ColdFusion?
- For development purposes, I stage several sites in different directories under a single virtual server, and all of them need to display site-specific error pages. Can this be done in CustomError?
- Does CustomError impact my server's performance?
- Can I fully customize my error messages to match my site look?
- What should my 404 or other error page contain?
Why should I customize my 404 and other server error messages?
Why shouldn't you? After all, as Brian Kelly and other Web usability experts have long pointed out, 404 pages are bound to be among the most visited on your site. If they do nothing to help the user recover from the error condition, or if they fail even to look like part of the site, this reflects badly on the site itself.Custom-tailored error messages are part of the practice known as contingency design. Web professionals are increasingly aware of this design factor, and this heightened awareness means that expectations are constantly rising. Ultimately, contingency design is all about the bottom line.
Using custom error pages is also a good security practice. Customized error pages, easily deployed with CustomError, will avoid displaying server-specific error messages that are used by hackers to fingerprint what operating system and Web server you are running. Check out these other IIS security recommendations.
back to top
Why do I need CustomError if I can already create custom error pages in IIS?
A key advantage of using CustomError is that one does not have to access the IIS server's Microsoft Management Console (MMC) interface in order to set up site-specific error pages -- and that you can have a default errors directory setup policy for new site creation in the future. All that is required is to place a file named for the appropriate HTTP response code (such as 404.htm or 500.asp, etc.) in a designated directory (/errors by default) under the Web site's document root.CustomError provides the advantage of placing error page design and deployment directly in the hands of the people who build and maintain a Web site -- rather than having to rely on a server administrator. As a result, custom error page design becomes a normal part of site design in general, encouraging such best practices as error pages that match the design of a Web site and are integrated with site-wide help mechanisms like search, site maps or contact forms.
back to top
Does CustomError work in a hosted environment where several sites must share a single machine? How will it help an HSP?
Yes. Besides making life easier for developers who need to deploy custom error pages, CustomError enables hosting vendors to easily provide custom error capability (and also 404 redirection control) to their shared hosting customers. Each Web site/virtual server provisioned in IIS has can have its own CustomError directory (or series of directories at various nodes of the site for customization options), and the CustomError service can be selectively enabled and disabled on a per-site basis. CustomError also provides a wizard for error page deployment across multiple sites that makes setup easy and does not require a restart for configuration changes (after initial installation).back to top
Why does CustomError provide 404 redirection control? Will that help my search engine rankings?
This feature was added at the request of Danny Sullivan, a world-renowned search expert. Many companies are working to enhance paid and natural search engine ranks, and redirection is a big challenge in the industry. SEO experts, site managers, and marketing folks stress about dead links and would like to do something with the traffic for pages that have been deleted or removed, but they do not have the control/ability to make a redirect themselves. Admins or developers responsible for IIS and Web site or application code can make such redirects easily -- but it is not necessarily the best use of their time or highest priority. This disconnect leaves many Web site users in the lurch, clicking on a link from one site that has moved or been deleted on another site -- and then getting a 404 error, often uncustomized. How many times have you clicked on such a link in a blog or to a blog post that is, well, dead? For these reasons, Port80 decided to put HTTP redirection control for 404 (resource cannot be found) errors in a rules file -- and hopefully into the hands of people that know about dead links and want to fix them.Simple and complex redirects (pass variables and referrer URLs, if you like) for deleted files or mistyped URLs can be managed by CustomError via a text file that is stored in each site or virtual server's Web root. Read the sample CustomError Redirection Rules file and use this feature to turn broken and mistyped links in good traffic. Resurrect your dead links, if you like.
back to top
Does CustomError work with ASP, ASP.NET, and ColdFusion?
Yes, but on 404 HTTP errors only, and this option is not enabled by default. Specifically for 404 server errors, CustomError can respond with a customized dynamic file with more interactivity than a static file, depending on how you code it. This feature allows you to define the type of dynamic file used and the order of preference for error files with the same name (e.g. 404.asp preferred to 404.cfm).back to top
For development purposes, I stage several sites in different directories under a single virtual server, and all of them need to display site-specific error pages. Can this be done in CustomError?
Yes. CustomError can be run in a special staging or "error directory search" mode that allows errors directories to be placed anywhere. When the option is enabled (see Error Directory tab in the Settings Manager), CustomError examines the path in the request URL and finds the errors directory (which can be named anything, but must have only one name per virtual server or site) located closest to the requested file. In this way, all of a site's features can be tested on a staging server, whether or not the site has its own virtual server.This option allows for a significant improvement in workflow over waiting until a site has been uploaded to its production environment before integrating "extras" like custom error messages. This mode can also be useful for maintaining different types of error pages for different sections of a production site. However, since all directories in the request path must be searched, this mode does impose a slight degradation in response times, and so this option should be used with caution -- limited caution, however, as this feature and all CustomError services only come into play when an HTTP error occurs. The alternative "production mode" provides maximum performance, but requires that a site's errors directory be located in a virtual server's Web root.
back to top
Does CustomError impact my server's performance?
No, it does not. First, CustomError is implemented as an ISAPI filter that has been designed and thoroughly stress tested for speed and robustness. Second, the filter is only invoked on error conditions such as 404, 403, 500, etc. Using CustomError in a staging mode (see previous question), you may see a small performance hit on requests that generate errors, but in production mode you should not be able to detect page performance degradation at all.back to top
Can I fully customize my error messages to match my site look?
Of course. The templates provided with CustomError are just suggestions. Any file can be used, provided it follows the naming convention XXX.htm or XXX.html, where XXX is the appropriate error code (e.g. 400.gif, 403.htm, or 500.aspx).back to top
What should my 404 or other error page contain?
First, make sure that your errors are clearly marked. Second, make sure that your error pages themselves match your site. Third, help the user recover from the error by pointing them to new content, a site map, or a search facility. Lastly, provide some way for the user to contact you if they need further assistance. Remember, good error pages equal good customer service for e-commerce sites -- and enhanced productivity for online business applications.back to top
