What happens when you type google.com in the browser
Details about how the browser works behind the scenes and what happens when you type google.com in the browser, starting from communication to the webpage rendering.
Anuj Sharma
Last Updated Feb 5, 2026

In order to understand the browser functionality, Its important to know what happens when you type google.com in the browser search bar. This overall process, primarily includes client-server communication and webpage rendering/painting in the browser. Also it's a very frequently asked frontend interview question at all the levels.
In this post, we will briefly describe the overall process into 3 major steps, here are those
Step 1: URL Parsing & Server Lookup
URL Parsing
When the user types google.com in the browser search text box and hits enter, the browser parses the overall URL to identify 3 things,
- protocol used - HTTPS vs HTTP
- Domain name - google.com
- URL path - here /
HTTPS/HTTP identification first happens at the browser caching level where the browser already knows, based on the caching supported protocols for the provided domain, for example, google.com always servers with HTTPS.
If the protocol is HTTPS, the communication happens on PORT 443, in case of HTTP communication happens on PORT 40
Server Lookup
In the next part, Browser tries to look for the IP address associated with the domain name. The search happens through various caching levels starting from
- Browser-level caching,
- Search for OS-level caching through the
hostsfile - Local DNS caching - Generally provided by ISP (Internet Service Provider)
- DNS level lookup - <DNS IP>:53
Note: if on the client side Firewall exists it authorizes the request before sending it to the server.
At the end of this step, browser knows about the IP address through which it needs to establish the communication.
Step 2: Setup TCP/IP Communication with the Server & Fetch Webpage
TCP/IP & TLS Connection
HTTP is the part of TCP/IP protocol, so when the IP address of the domain got identified, browser tries to establish TCP/IP connection with the server. This communication starts with TCP/IP handshake.
When the TCP/IP (Transmission Control Protocol/ Internet Protocol) connection is established with the server, a request using SSL or TLS (Transport Layer Security) is sent to the server. This established a secure tunnel between browser and server for secure encrypted communication.
Note: In summary, browser and server exchange the signed SSL certificates in order to established the encrypted communication.
Fetch Webpage GET /google.com
Once TCP connection got established, browser sends the HTTP get call the URL - GET http://www.google.com which returns the webpage code in the GET response.
Step 3: HTML Page Parsing & Rendering on Screen
Once the HTML page got as part of the GET response, now the next job of the browser is to render that webpage into the browser window. This involves below steps
1. HTML Parsing
At this step 3 major processing happened on the HTML page by the browser
HTML Parsing
Browser starts parsing the HTML page starting from top to bottom, in order to identify the HTML tokens.
Loading JS files, Executing JS
As soon as browser hits the script element, if it's an inline script it executes the javascript. In case of external script, it fetches the JS resources from the mentioned src URL and execute the same. Execution of the script depends on the async, defer parameters.
// Internal JavaScript Linking
<script> inline javascript </script>
// External JavaScript Linking
<script defer src="script.js"></script>
Loading CSS files
Similar to JS files, as soon as browser hits the link element, it loads the external CSS files from the href URL.
<link rel="stylesheet" href="styles.css">
2. Rendering Tree
Document Object Modal (DOM)
Browser creates the DOM after parsing the HTML page, DOM represents the HTML elements with properties in the hierarchical format.
CSS Object Object Modal (CSSOM)
Browser creates CSSOM after parsing the CSS attached to the HTML page, inline or through external URLs
Browser creates Render Tree after merging the DOM and CSSOM, which will going to be render on the browser viewport.
3. Layout & Painting on Screen
Define Layout
After generating the render tree, browser define the layout of the webpage as per associated DOM & CSSOM. Browser uses the Box Modal concept to define the layout the elements.
This is the step, where changes can impact the Cumulative layout shift (CLS) core web vital. Every time any layout shift happened calculation of the new layout and the painting step happens which is a costly operation for the browser.
Painting on Screen
In this last step browser, paints the pixels on the screen as per the layout, defined colors, and other properties like z-index. After this step the whole webpage appeared on the browser viewport.
A seasoned Sr. Engineering Manager at GoDaddy (Ex-Dell) with over 12+ years of experience in the frontend technologies. A frontend tech enthusiast passionate building SaaS application to solve problem. Know more about me ๐
Learn Next
Comments
Ravi Shankar Kumar
try.ravishankarkumar@gmail.com
19 Jun, 2025
Nicely explained with minute details that can help in acing the interview!!
Anuj Sharma
Replyanujsharma.engg@gmail.com
13 Jun, 2026
Thank you ๐
Share your expertise
Publish a blog or quick notes on topics you know well โ your write-up could be the answer someone needs before their next frontend interview.
Build your portfolio
Help the community
Sharpen your skills
Earn goodies
Other Related Blogs
How does JWT (JSON Web Token) Authentication work - Pros & Cons
Frontendgeek
Last Updated Jun 15, 2026
Understand the JWT(JSON Web Token) and how JWT decode works. It also covers how the end-to-end JWT authentication works between client & server, along with the pros and cons of using JWT.
What is CORS ? Cross-Origin Resource Sharing Explained [For Interviews]
Anuj Sharma
Last Updated Feb 6, 2026
A brief explanation of Cross-Origin Resource Sharing (CORS) concept to enable client application accessing resources from cross domain and HTTP headers involved to enable resource access.
Understand JavaScript Local Storage, Session Storage and Cookies
Anuj Sharma
Last Updated Feb 6, 2026
Explore how to create and use javascript local storage, session storage and cookies. Explore the key differences between Local Storage vs Session Storage vs Cookies to understand the trade-offs.
Part 1: From Zero to Published โ How I Built and Published My First React NPM Package
Akash Deep Chitransh
Last Updated Feb 6, 2026
Learn how to build and publish your own NPM package with Rollup, testing, and troubleshooting. Stay tuned for part 2: building a React state management library!
Understanding Critical Rendering Path (CRP) to Improve Web Performance
Anuj Sharma
Last Updated Feb 6, 2026
Understand what all steps are involved in the Critical Rendering Path (CRP) and how optimization of different steps can improve the overall web-vitals of a web application
Boost Your Site Speed with CSS Sprites: A Practical Guide
Vaibhav Kumar
Last Updated Jan 28, 2026
Master CSS sprites to slash HTTP requests, supercharge load times, and optimize iconsโpractical guide with code, tools, and 2026 best practices.
Explained Web Authorization Techniques - Session & JWT
Anuj Sharma
Last Updated Dec 16, 2025
Understand important web authorization techniques to enhance role-based authentication for any web application with popular techniques like Session & JSON Web Token (JWT)
