An bad implemented browser can omit send que host header information, try this example:
telnet myphpserver.com 80
> GET /
in this case $_SERVER['HTTP_HOST'] not have assigned value, in this case u can use $_SERVER['SERVER_NAME'] but only if $_SERVER['HTTP_HOST'] is empty, because no is the same.