DjIns1ght DjIns1ght - 2 months ago 11
HTML Question

What does the "example.com" refer to in a GET request?

What does the "example.com" refer to in the GET request such as this F5 health monitor example:

GET /somefolder HTTP/1.1\r\nHost: www.example.com\r\nConnection: Close\r\n\r\n

GET / [uri path]
HTTP/1.1 [http encoding]
[Carriage Return/LineFeed]
Host: [required for http 1.1 to specify the next part]
www.example.com <**?????**>
Connection: Close [command to end query request]
[CR/LF/CR/LF]

Answer

Simply put, it's saying which domain the request is intended for. You're asking for path / but a single server could be serving hundreds of domains, so it needs to know which / you want.