Configuring HTTP Response Headers in IIS 7

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

When a client browser requests a Web page, IIS returns a response with a Hypertext Transfer Protocol (HTTP) header. HTTP response headers are name and value pairs that contain information about the requested page. These include the HTTP version, date, and content type.

You can create custom headers to pass special information in responses to clients. For example, you could create a custom header named “authors” that might contain the names of content authors. Or you might create a Content-Language header to describe the natural languages used in the body of your Web page, and provide several language-country/region values such as en-US (United States English), en-CA (Canadian English), and en-GB (British English).

If you create a custom HTTP response header at the Web server level, all Web sites, Web applications, virtual directories, and files inherit the header unless you override the header at a child level. Likewise, Web applications and virtual directories inherit headers from the Web site level, and files inherit headers from the Web application or virtual directory level. You can remove an inherited header so that it is not passed in a response, and restore the header later if it is required.

Prerequisites

For information about the levels at which you can perform these procedures, and the modules, handlers, and permissions that are required to perform these procedures, see HTTP Response Headers Feature Requirements (IIS 7).

Procedures

This task includes the following procedures:

View a List of HTTP Response Headers (IIS 7)

Add a Custom HTTP Response Header (IIS 7)

Edit the Value of a Custom HTTP Response Header (IIS 7)

Remove a Custom HTTP Response Header (IIS 7)

Rename a Custom HTTP Response Header (IIS 7)

Enable the HTTP Keep-Alive Response Header (IIS 7)

Configure the HTTP Expires Response Header (IIS 7)

See Also

Other Resources

RFC 2616