What happens when you type 'www.google.com' in your browser and press Enter.
If you are in any technical profession, I am sure someone at some point has asked you this question. Whether you are an engineer, developer, marketer,

I'm a passionate full-stack web developer with a strong foundation in front-end and back-end technologies. I've honed my skills in HTML, CSS, JavaScript, Python, C, and more.
I’m driven by a love for problem-solving and innovation, particularly in the field of Artificial Intelligence. I believe in the power of technology to shape a better future, and I’m excited to contribute to projects that push boundaries and create meaningful impact
INTRODUCTION:
If you are in any technical profession, I am sure someone at some point has asked you this question. Whether you are an engineer, developer, marketer, or even in sales, it is always good to have a basic understanding of what is going on behind our browsers and how information is transferred to our computers via the internet.
When you type "https://www.google.com" into your web browser and hit enter, a series of events occurs in the background to retrieve and display the content of the Google homepage.
Here's a detailed explanation of what happens under each heading;
DNS request:
When You type https://google.com into the address bar of your browser. The browser checks the cache for a DNS record to find the corresponding IP address of maps.google.com.DNS(Domain Name System) is a database that maintains the name of the website (URL) and the particular IP address it links to.
Every single URL on the internet has a unique IP address assigned to it. The IP address belongs to the computer which hosts the server of the website we are requesting to access.
TFor example, www.google.com has an IP address of 209.85.227.104. So if you’d like, you can reach www.google.com by typing http://209.85.227.104 on your browser.

TCP/IP:
Once the IP address of the web server has been obtained, a TCP/IP connection is established between your computer and the web server. TCP/IP (Transmission Control Protocol/Internet Protocol) is a set of protocols that defines how data is transmitted over the internet.
Here's what happens in more detail:
The browser sends a request to the server using IP to establish a connection.
The server receives the request and sends back a message acknowledging the request to establish a connection. This is the handshake process.
Once the handshake is complete, the browser can send a request for the webpage it wants to access (in this case, the homepage of google.com). This request is sent using TCP, which ensures that the request is transmitted reliably and in the correct order.
The server receives the request and sends back the HTML code for the homepage of google.com to the browser. This response is also sent using TCP to ensure reliable transmission.
The browser receives the HTML code and uses it to render the webpage on your screen. Any resources (such as images) that the webpage needs are also requested and received using TCP/IP.
Firewall:
Before the connection is established, it may pass through a firewall. A firewall is a security system that controls incoming and outgoing network traffic based on predetermined security rules. The firewall will check the incoming traffic (i.e. the request to access the Google website) against its security rules and determine whether or not to allow the connection.
There are two main types of security rules that a firewall uses to check incoming requests:
Rules that allow or block traffic based on the source and destination of the request. For example, a firewall may be configured to block all traffic from certain countries or to allow only certain IP addresses to access the network.
Rules that allow or block traffic based on the type of traffic. For example, a firewall may be configured to block all traffic on certain ports (such as those used by malware) or to allow only certain types of traffic (such as HTTP or HTTPS).
HTTPS/SSL:
Once the connection is established, the next step is to establish a secure connection using HTTPS (Hypertext Transfer Protocol Secure) and SSL (Secure Sockets Layer). HTTPS is a protocol for securely transmitting data over the internet, and SSL is a security protocol that provides encryption and authentication for the data transmitted over HTTPS.
Once the TCP connection is established, it is time to start transferring data! The browser will send a GET request asking for the google.com web page. If you’re entering credentials or submitting a form, this could be a POST request. This request will also contain additional information such as browser identification (User-Agent header), types of requests that it will accept (Accept header), and connection headers asking it to keep the TCP connection alive for additional requests. It will also pass information taken from cookies the browser has in store for this domain.
Load-balancer:
The request to access the Google website may be handled by a load-balancer. A load-balancer is a system that distributes incoming traffic across multiple servers to ensure that no single server is overwhelmed. The load-balancer will forward the request to one of the web servers hosting the Google website.
Web server:
The web server is responsible for handling the request and returning the appropriate content to the user. When the web server receives the request, it will check to see if the requested content is available in its cache. If the content is available in the cache, it will be returned to the user. If the content is not available in the cache, the web server will retrieve the content from the application server or the database.
Application server:
The application server is responsible for running the application code that powers the website. If the content is not available in the cache, the web server will forward the request to the application server, which will process the request and return the appropriate content to the web server.
Database:
The database is where the data for the website is stored. If the content is not available in the cache or on the application server, the web server will request the data from the database. The database will retrieve the requested data and return it to the web server, which will then pass it along to the user.
Conclusion
Although this seems like a very tedious prolonged process, we know that it takes less than seconds for a web page to render after we hit enter on our keyboard. All of these steps happen within milliseconds before we could even notice. I sincerely hope this article helps you answer the question, “What happens when you type a URL in the browser and press enter?”.
Feel free to like, comment or share this article if it was helpful:)


