title: Retrieve Domain Name instead of IP
body: <p>All,</p>
  
  <p>I am using the following command to retrieve the domain name of my server.</p>
  
  <pre><code>$_SERVER['HTTP_HOST']
  </code></pre>
  
  <p>This seems to return the IP address instead of domain name like www.example.com. I looked at PHPInfo and it also lists an IP address for HTTP_HOST instead of Domain name. What do I need to change to make the domain name appear instead of IP?</p>
  
  <p>Thanks</p>