Harvard Extension School
CSCI S-12 Fundamentals of Web Site Development | Spring 2020

## HTTP Header: Host

Problem: "Infinite" domain names; finite IP addresses.

Solution: "Virtual Hosts"

Example: all of the following names map to 140.247.197.241

- cscie12.dce.harvard.edu
- cscie18.dce.harvard.edu
- cscie153.dce.harvard.edu
- cscisl.dce.harvard.edu
- cscie12.dce.harvard.edu
- csci12.dce.harvard.edu
- aopophis.dce.harvard.edu

### Host Header

This is required for HTTP 1.1 requests.

    HEAD /http/raspberry.gif HTTP/1.1
    Host: cscie12.dce.harvard.edu

    HTTP/1.1 200 OK
    Date: Tue, 8 Apr 2015 20:23:14 GMT
    Server: Apache/2.2 (Fedora)
    Last-Modified: Wed, 06 Apr 2005 19:30:42 GMT
    ETag: "461fb8-348c-a0f67c80"
    Accept-Ranges: bytes
    Content-Length: 13452
    Connection: close
    Content-Type: image/gif

    Connection closed by foreign host.

Copyright © David Heitmeyer