How To Configure Custom Error Messaging for Your Web Site in IIS (302570)
The information in this article applies to:
- Microsoft Internet Information Services 5.0
This article was previously published under Q302570 SUMMARY
This step-by-step guide describes how to configure Internet Information Services (IIS) to send custom error messages instead of the default Hypertext Transfer Protocol (HTTP) error messages.
back to the top
Requirements
The following items describe the recommended hardware, software, network infrastructure, skills and knowledge, and service packs that you need:
- Internet Information Services 5.0
- Microsoft Internet Explorer 3.x, 4.x, 5.x
back to the top
Configure Custom Error Messages
When a user attempts to connect to a Web site and an HTTP error occurs, a generic message is sent back to the client browser with a brief description of what happened during the attempt to establish a connection. You can configure IIS to send custom error messages instead of the default error messages by mapping to a file or by mapping to a URL.
back to the top
Adding Custom Error Messages by Mapping to a File
To add a custom error message by mapping to a file, follow these steps:
- Create a file that contains your custom error message and place it in a folder.
- In the Internet Information Services snap-in, select the Web site, virtual folder, folder, or file in which you want to customize HTTP error messages, and click Properties.
- On the Custom Errors property sheet, select the HTTP error message that you want to change and click Edit Properties.
- In the Message Type box, select File.
- Type the path and file name that points to your customized error message, or use the Browse button to locate the file on your computer's hard disk. Click OK.
back to the top
Adding Custom Error Messages by Mapping to a URL
To add a custom error message by mapping to a URL, follow these steps:
- Create a file that contains your custom error message and place it in a virtual folder.
- In the Internet Information Services snap-in, select the Web site, virtual directory, directory, or file in which you want to customize HTTP error messages, and click Properties.
- On the Custom Errors property sheet, select the HTTP error message that you want to change and click Edit Properties.
- In the Message Type box, select URL.
- Type the URL that points to your customized error message by entering the path to the URL, beginning with the virtual folder name. Click OK.
back to the top
Enable Detailed Custom Error Messages
IIS features its own set of custom errors that provide more informative or "friendly" feedback than default HTTP 1.1 error messages. These detailed custom error messages are set by default in the Default Web Site in the IIS snap-in.
back to the top
Configuring Detailed Error Messages- In the Internet Information Services snap-in, select the Web site, virtual directory, directory, or file in which you want to customize HTTP error messages and click Properties.
- On the Custom Errors property sheet, select the default HTTP error message that you want to change and click Edit Properties.
- In the Message Type box, select File.
- Click Browse and browse to <drive letter>:\Winnt\Help\Iishelp\Common\File name.
back to the top
Modification Type: | Minor | Last Reviewed: | 7/1/2004 |
---|
Keywords: | kbGraphxLink kbhowto kbHOWTOmaster KB302570 kbAudDeveloper kbAudITPro |
---|
|