Question: I'm confused about the difference between these two server variables. Checking the IIS documentation, it states :-

### HTTP\_HOST

> 
> Returns the name of the Web server.
> This may or may not be the same as
> SERVER\_NAME depending on type of name
> resolution you are using on your Web
> server (IP address, host header).
> 
> 
> 

### SERVER\_NAME

> 
> The server's host name, DNS alias, or
> IP address as it would appear in
> self-referencing URLs.
> 
> 
> 

Could someone provide some examples how they can be different?

We have 2 IIS webservers in our web farm .. and each one has 2 websites (identical of course, per server).

For each website has around 5 or so bindings.

So .. what would the values be? what's the difference?

Answer: 
I don't know about ASP.NET, but in PHP, `$_SERVER['HTTP_HOST']` is what the client sent in the HTTP `Host` header, while `$_SERVER['SERVER_NAME']` is determined by the webserver configuration.
`HTTP_HOST` is HTTP Host Header, can be changed via DNS (add a domain and poit to your server) or just via HOSTS file on your computer.

SERVER\_NAME on Windows is the Machine name. you can see the name (or change it) via Right Click on `My Computer` (or Computer on Win10+), and Properties.