Difference between Host in the URL and Host Header

Prev Next

Host in the URL

Host Header

The host in the URL determines who the client open a TCP communication with. The Host field in HTTP header is part of the HTTP protocol. It specifies to the HTTP server the intended host that the client is trying to communicate with.
The same host/domain can resolve to the same IP, as other hosts/domains. The host in the HTTP header allows the webserver to determine which website (web host) the communication is intended for.

Host header and Request Override are options within the Request section which can be used to add additional properties to the HTTP header the agent sends when running a test.

Option: Host Header

When the Host header is created, the hostname with the override is displayed. The host header is viewable in the request section of the request headers. It is recommended to enable capture headers in order to verify the host header.

For example, in the below test case, the URL is http://google.com and the Host Header setting is:

Option: Request Override

The request override option will override the requested URL and redirect the URL to the one specified. In the test below, google.com is overridden to example.com