What Happens when you type https://google.com in your Browser then press Enter
Tags: webbrowsing, urlinput, internetnavigation, webdev
Published: 2024-03-30 17:02:12

_Ever wondered how websites load on your browser? Learn about the technical processes involved, including DNS requests, TCP/IP, firewalls, HTTPS/SSL, load-balancers, web servers, application servers, and databases._

DNS Request The first step in accessing a website is to resolve its domain name to an IP address. The domain name system (DNS) is responsible for this task. Your browser sends a DNS request to a DNS server to retrieve the IP address of the domain name “www.google.com". If the DNS server has the IP address in its cache memory, it returns it to your browser; otherwise, it sends a request to another DNS server until it finds the IP address.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b6st73z3laje9wxl63ex.png)
TCP/IP Once your browser knows the IP address of the website, it establishes a TCP/IP connection to the server. Transmission Control Protocol (TCP) is a protocol used to establish a reliable connection between two devices. Internet Protocol (IP) is responsible for routing data packets between devices over the internet.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2sbephvt8ur4soprk3wf.png)

Firewall Firewalls are used to protect servers from unauthorized access. Once your browser establishes a TCP/IP connection to the server, the firewall checks whether your IP address is authorized to access the website. If your IP address is authorized, the firewall allows the connection to proceed; otherwise, it blocks the connection.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j8z5zah8br37qzqz6qto.png)

HTTPS/SSL After the connection is established, your browser and the server negotiate a secure connection using HTTPS (Hypertext Transfer Protocol Secure) protocol. HTTPS is a secure version of HTTP that uses SSL/TLS (Secure Sockets Layer/Transport Layer Security) to encrypt data transmitted between the browser and the server. SSL/TLS certificates are used to verify the authenticity of the server and encrypt data sent between the browser and the server.

Load Balancer Load balancers are used to distribute traffic evenly across multiple servers to improve performance and prevent overload. In the case of Google, the load balancer distributes the incoming traffic across multiple web servers to handle the load.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/28hz6a33kd221mo04bci.png)

Web Server Once the connection is established and the load balancer has distributed the traffic, the web server receives the request. The web server is responsible for processing the request and returning the response. In the case of Google, the web server returns the HTML code for the Google search engine’s homepage.

Application Server The application server is responsible for handling dynamic content generation and server-side scripting. It retrieves data from the database and returns it to the web server, which then sends it to the client’s browser. In the case of Google, the application server retrieves search results from the database and returns them to the web server.

Database Databases store and manage website data. In the case of Google, the database stores the search index and user data, such as search history and preferences.

In conclusion, accessing a website involves a complex chain of events, including DNS resolution, TCP/IP connection establishment, firewall authorization, HTTPS/SSL negotiation, load balancing, web server processing, application server handling, and database retrieval. Understanding this process can help us appreciate the technical complexity of the internet and the technologies that make it possible.