DEV Community

Cover image for What happens when you type www.google.com and hit enter on your keyboard?
martin_ndegwa
martin_ndegwa

Posted on

What happens when you type www.google.com and hit enter on your keyboard?

Introduction.

The Uniform Resource Locator(URL), which is a reference to that web resource, identifies the place on a computer network where a web resource is located and how it can be retrieved. Let's look at what happens when you type in a URL, like https://ww.google.com, in your browser and press Enter.

A URL

dns lookup

When we look at the (URL), the first word stands for Hypertext Transfer Protocol Secure "HTTPS." It is an internet protocol that communicates with the server to handle the browser's request. The domain google.com
includes the "www" subdomain. The URL is first sent to a Domain Name Server (DNS), a computer with a database of public IP addresses and the hostnames that correspond to them. The initial action that takes place when you search for any URL in the browser is referred to as a DNS query. The reason is that, unlike IP addresses, hostnames are strings with a domain name suffix that the servers cannot understand.

TCP/IP connection

type_the_url
Now that we have the corresponding IP address to our domain name, the next process is a TCP three-way handshake between both the browser (client) and server: synchronize (a.k.a. SYN), and acknowledge (a.k.a. ACK). The client here sets an initial SYN sequence number; the server also has its own sequence number, which increments the client’s SYN. The server then sends back a (SYN/ACK) packet to the client and awaits the client's ACK by incrementing its SYN.

HTTPS/SSL

Once the TCP/IP connection has been established, the browser proceeds to communicate with the server using a secure protocol (HTTPS). This protocol defines different types of requests (e.g., GET, POST, and PUT), which are secured by a security protocol called Secure Sockets Layer that encrypts and decrypts the data from the client to the server infrastructure at the load balancer.

Load Balancer

The load balancer distributes website user requests across a number of servers when there is a high volume of requests in order to avoid a single point of failure (SPOF) or downtime.

The Firewall, also known as the Great Wall

The firewall analyzes incoming traffic using pre-established rules and filters traffic from untrusted or shady sources to prevent attacks from hackers who can intercept user traffic. Users are permitted to connect to a web server that will be assigned by the load balancer if their requests are not malicious or suspicious.

Web Server and Application Server

web servers

Now let’s do a recap. First, we started by doing a DNS query, which helps get an IP address associated with the domain name of our website. The IP address is sent back to our browser client, which sends the IP address to the server, where a TCP/IP connection is established. When this is done, the browser can now communicate with the server through the HTTPS protocol. The encryption and decryption of data between the server and the client are done through a standard security protocol called Secure Sockets Layer (SSL). The load balancer can then serve the web server with users’ requests if the firewall allows the incoming traffic.
Let’s define a web server. A web server is a software and hardware system that only handles HTTP and HTTPS requests and serves static content like simple HTML pages, plain text files, and images.
The application server, on the other hand, runs behind a web server and in front of a database management system (DBMS). Its main purpose is to generate dynamic content support for an application’s development and delivery, thus providing the business logic behind the application.

Data Management

Database Management System (DBMS), A program that allows the interaction with a database (an organized collection of structured information or data stored in a computer system) to define, manipulate, retrieve, and manage the data according to the request

Conclusion


This is the entire process when you type https://google.com and hit enter. It might look like a lot, but this happens within a few seconds, and you get dynamic content served to your browser through a secured HTTPS connection. I hope the explanation is easy to understand.

Top comments (0)