Search code examples
dnsip-addresshostname

Will I be able to access a bookmark faster if I store its ip address instead of hostname in the bookmark?


If I want to visit https://stackoverflow.com/teams/use-cases.

1) Will it be faster if I visit it via https://151.101.129.69/teams/use-cases instead because it skips the DNS look up for stackoverflow.com to 151.101.129.69?

2) Why does Firefox display a "Warning: Potential Security Risk Ahead" page and not allowing me to go to the page successfully directly?

3) Why am I not able to reach the page using the URL that contains the IP address? It shows Fastly error: unknown domain: 151.101.129.69. Please check that this domain has been added to a service.

Thanks!


Solution

  • A (web)server running on one IP address can host multiple websites, so it relies on domain name you typed in your address bar to determine which website you wanted to access.

    When you take the above into account,

    1. In some cases yes, but most of the time that will just not work. Even if it works, performance improvement will be negligible (unless you have some serious issues with your DNS infrastructure).

    2. HTTPS requires that the domain name you typed in your browsr matches the domain name in the certificate on server side, stackoverflow.com != 151.101.129.69 so you get the warning

    3. Server just does not know which website to serve, there is no website with name "151.101.129.69" configured there