What happens when you type a URL in your browser and press Enter

Mhamed Azouzi
5 min readAug 23, 2020

The Internet’s history goes back some decades by now — email has been around since the 1960s, file sharing since at least the 1970s, and TCP/IP was standardized in 1982. But it was the creation of the world wide web in 1989 that changed our history of communication to the extent that it is now our first selected way of everyday communication.
The Internet today has the power to cancel all the geographic fetters and brings us together in topic-based communities that is not limited to any specific place.
Furthermore, it has changed all industries from business, education, government, to healthcare, and even how we interact with our loved ones — it has become one of the key drivers of social evolution.
So what’s happening behind the scenes when we’re trying to access a website. First, we enter the URL which stands for Uniform Resource Locator. URL is the address of the website which you can find in the address bar of your web browser. It is a reference to a resource on the internet, be it images, hypertext pages, audio/video files, etc.
The navigator takes the URL and :

Checks cache for DNS entry to find the corresponding IP address of the site :
· Browser Cache
· Operating Systems Cache
· Router Cache
· ISP Cache
If not found in the cache, ISP’s (Internet Service Provider) DNS server initiates a DNS query to find the IP address of the server that hosts the domain name.
The requests are sent using small data packets that contain information content of the request and IP address it is destined for.
This is called a DNS query (also known as a DNS request) is a demand for information sent from a user’s computer (DNS client) to a DNS server. In most cases a DNS request is sent, to ask for the IP address associated with a domain name. An attempt to reach a domain is actually a DNS client querying the DNS servers to get the IP address, related to that domain.

What’s an IP address:

IP addresses are represented as four numbers each between 0 and 255 separated by dots. the Ip address of www.holbertonschool.com is 52.0.149.47. Every device connected to the Internet has an IP address, regardless of whether it is a server or not. Your computer has an IP address too.

after the Ip address is found the Browser initiates a TCP (Transfer Control Protocol) connection with the server using synchronize(SYN) and acknowledge(ACK) messages and sends an HTTPS request to the server.

HTTPS uses an encryption protocol to encrypt communications. The protocol is called Transport Layer Security (TLS), although formerly it was known as Secure Sockets Layer (SSL). This protocol secures communications by using what’s known as an asymmetric public key infrastructure. Prevents websites from having their information broadcast in a way that’s easily viewed by anyone snooping on the network. When information is sent over regular HTTP, the information is broken into packets of data that can be easily “sniffed” using free software. This makes communication over an unsecured medium, such as public Wi-Fi, highly vulnerable to interception. All communications that occur over HTTP occur in plain text, making them highly accessible to anyone with the correct tools, and vulnerable to on-path attacks.
Inside The server, a computer that runs websites, there is a Load balancer which is defined as the methodical and efficient distribution of network or application traffic across multiple servers in a server farm. Each load balancer sits between client devices and backend servers, receiving and then distributing incoming requests to any available server capable of fulfilling them.

After the Load balancer gives the webserver, a computer that runs websites, the request. It handles that request and sends back a response. The basic objective of the web server is to store, process, and deliver web pages to the users. This intercommunication is done using Hypertext Transfer Protocol (HTTP). These web pages are mostly static content that includes HTML documents, images, style sheets, tests, etc. Apart from HTTP, a web server also supports SMTP (Simple Mail Transfer Protocol) and FTP (File Transfer Protocol) protocol for emailing and for file transfer and storage. These days, the Apache server is the most common web server available in the market. Apache is open-source software that handles almost 70 percent of all websites available today. Most of the web-based applications use Apache as their default Web Server environment. Another web server that is generally available is Internet Information Service (IIS) by Microsoft.

Most websites have applications running inside them which brings us to the application server which is a type of server designed to install, operate and host applications and associated services for end-users, IT services, and organizations. It facilitates the hosting and delivery of high-end consumer or business applications, which are used by multiple and simultaneously connected local or remote users. And you can’t build an application without a database, a collection of information that is organized so that it can be easily accessed, managed and updated. Computer databases typically contain aggregations of data records or files, containing information about sales transactions or interactions with a specific customer, etc.

After handling the request, the webserver assembles a response, and then it sends out an HTTP response along with the status of the response. Finally, the Browser displays HTML content
All these communications are supervised by a Firewall. It’s a software or firmware that prevents unauthorized access to a network. It inspects incoming and outgoing traffic using a set of rules to identify and block threats.
Firewalls are used in both personal and enterprise settings, and many devices come with one built-in, including Mac, Windows, and Linux computers. They are widely considered an essential component of network security

--

--