What happens when you type holbertonschool.com in your browser and press Enter

Hamdi Ghorbel
5 min readAug 23, 2020

“What happens when you type in a URL” is a deceptive question commonly asked in tech interviews. If you look online, there are many very detailed resources but few concise explanations of how a web browser, a server, and the general internet work together.

This is how I would explain it:

  1. You enter a URL into a web browser
  2. The browser looks up the IP address for the domain name via DNS
  3. The browser sends a HTTP request to the server
  4. The server sends back a HTTP response
  5. The browser begins rendering the HTML
  6. The browser sends requests for additional objects embedded in HTML (images, css, JavaScript) and repeats steps 3–5.
  7. Once the page is loaded, the browser sends further async requests as needed.

That’s really it. Here’s a description in words for this site.

When you type “https://wsvincent.com” into your browser the first thing that happens is a Domain Name Server (DNS) matches “wsvincent.com” to an IP address. Then the browser sends an HTTP request to the server and the server sends back an HTTP response. The browser begins rendering the HTML on the page while also requesting any additional resources such as CSS, JavaScript, images, etc. Each subsequent request completes a request/response cycle and is rendered in turn by the browser. Then once the page is loaded some sites (though not mine) will make further asynchronous requests.

If I were asked to explain further I might start talking about how the server and browser connect via TCP. And we could discuss encryption via https, too.

But fundamentally, it’s only 7 steps. I hope this clears up any confusion for readers.

The Web Browser:

A web browser (commonly referred to as a browser) is a software application for accessing information on the World Wide Web. When a user requests a web page from a particular website, the web browser retrieves the necessary content from a web server and then displays the page on the user’s device.

A web browser is not the same thing as a search engine, though the two are often confused. For a user, a search engine is just a website that provides links to other websites. However, to connect to a website’s server and display its web pages, a user must have a web browser installed.

Web browsers are used on a range of devices, including desktops, laptops, tablets, and smartphones. In 2019, an estimated 4.3 billion people used a browser. The most used browser is Google Chrome, with a 64% global market share on all devices, followed by Safari with 18%.

The purpose of a web browser is to fetch information resources from the Web and display them on a user’s device.

This process begins when the user inputs a Uniform Resource Locator (URL), such as http://www.holbertonschool.com/index.html, into the browser. Virtually all URLs on the Web start with either http: or https: which means the browser will retrieve them with the Hypertext Transfer Protocol (HTTP). In the case of https:, the communication between the browser and the web server is encrypted for the purposes of security and privacy.

Once a web page has been retrieved, the browser’s rendering engine displays it on the user’s device. This includes image and video formats supported by the browser.

Web pages usually contain hyperlinks to other pages and resources. Each link contains a URL, and when it is clicked or tapped, the browser navigates to the new resource. Thus the process of bringing content to the user begins again.

Most browsers use an internal cache of web page resources to improve loading times for subsequent visits to the same page. The cache can store many items, such as large images, so they do not need to be downloaded from the server again. Cached items are usually only stored for as long as the web server stipulates in its HTTP response messages

Page Cannot Be Displayed When You Connect Through SSL

When you connect to a computer running Internet Information Services (IIS) by using Secure Socket Layer (SSL), the following error message may occur:

The page cannot be displayed.
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.

This Web site is usually the second Web site on the server. Connecting to the Web site through HTTP works correctly.

After SSL is enabled on an IIS Web server, the IIS service begins to listen on all used and unused IP addresses on ports 80 and 443. For multi-IP address servers, you may want to disable this feature. This feature was added the product for performance gain.

This problem usually occurs when you try to set up SSL on the administration Web site. IIS finds the SSL settings for the default Web site and listens on port 443. However, the default Web site does not have a certificate to correspond to that site. Therefore, no connection can be made, which is why you can see a server listening on port 443, but you cannot connect to the site.

HTTPS:

Hypertext Transfer Protocol Secure (HTTPS) is an extension of the Hypertext Transfer Protocol (HTTP). It is used for secure communication over a computer network, and is widely used on the Internet.[1][2] In HTTPS, the communication protocol is encrypted using Transport Layer Security (TLS) or, formerly, Secure Sockets Layer (SSL). The protocol is therefore also referred to as HTTP over TLS,[3] or HTTP over SSL.

The principal motivations for HTTPS are authentication of the accessed website, and protection of the privacy and integrity of the exchanged data while in transit. It protects against man-in-the-middle attacks, and the bidirectional encryption of communications between a client and server protects the communications against eavesdropping and tampering.[4][5] In practice, this provides a reasonable assurance that one is communicating with the intended website without interference from attackers.

The authentication aspect of HTTPS requires a trusted third party to sign server-side digital certificates. This was historically an expensive operation, which meant fully authenticated HTTPS connections were usually found only on secured payment transaction services and other secured corporate information systems on the World Wide Web. In 2016, a campaign by the Electronic Frontier Foundation with the support of web browser developers led to the protocol becoming more prevalent. HTTPS is now used more often by web users than the original non-secure HTTP, primarily to protect page authenticity on all types of websites; secure accounts; and to keep user communications, identity, and web browsing private.

--

--