I'm looking at a web site we'll call www.example.com . A quick traceroute www.example.com
shows that its IP address is 208.76.xx.xxx .
When I browse to "www.example.com" in Firefox, I am shown the web site (a login page). However, when I browse to 208.76.xx.xxx , I am shown a default "Welcome to cPanel!" web page.
Here is some more information:
curl -L www.example.com
returns the web site, while curl -L 208.76.xx.xxx
returns the "Welcome to cPanel!" page.curl -LI www.example.com
shows that I am redirected to the site's login page (as expected), while curl -LI 208.76.xx.xxx
does not have a redirect.Can someone please explain why navigating to the site's domain name shows a completely different page than navigating to the site's IP address?
Thanks for your help, and feel free to ask questions/suggest tests for me to run.
It is called virtual hosting.
One web server (and IP address) can server thousands of sites, with different Host: field in HTTP requests.
You ask browser for example.org; browser tells the server
GET / HTTP/1.1
Host: example.org
Connection: close
Webserver looks if it can serve example.org, if it can, it would serve the root page for this specific site.
Proxies also work that way: you browser sends every HTTP request to the proxy, giving Host:, proxy connects to that host, asks for a page and gives it back, cached.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With