Celeb Glow
news | March 03, 2026

Loading a website using IP

As per my understanding DNS is used for resolving domain names into IP addresses. I am using Ubuntu. I did following. nslookup facebook.com gave me the IP of the website. I blocked DNS using firewall. The I typed IP into browser. It should have loaded facebook site but it did not. If I unblock the DNS, then above method fetches the site. Why this happens - I mean why DNS is required when I have the IP of the website ?

10

1 Answer

When you access a website over HTTP, the domain name isn't used just for DNS; it is also sent over HTTP itself (as a Host: header). That way, the same server can host many websites (sometimes one or two, sometimes hundreds at once) on the same IP address – called virtual hosting.

With HTTPS connections, the same name is sent over TLS too (as a Server Name Indication extension), so the server can choose which certificate to use for which site, again when hosting many sites on the same IP address.

But if you try to access , there's nothing the browser could send, so the server doesn't know which site you wanted, either.


(I'm pretty sure this has been answered many times, but I can't find a good post on the site)

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy