HTTP Header: Host
Problem: "Infinite" domain names; finite IP addresses.
Solution: "Virtual Hosts"
Example: all of the following names map to the same IP.
- cscie12.dce.harvard.edu
- cscis12.dce.harvard.edu
- csci12.dce.harvard.edu
- cs12.dce.harvard.edu
- cs12students.dce.harvard.edu
- dph445.cs12students.dce.harvard.edu
- And your NetID too!
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 2020 20:23:14 GMT
Server: Apache/2.2 (Fedora)
Last-Modified: Wed, 06 Apr 2015 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.
Host Header: dph445.cs12students.dce.harvard.edu
That's how we have a unique hostname for each student!