What happens when you type google.com in your browser and press Enter?!

What happens when you type google.com in your browser and press Enter?!

Imagine typing google.com and hitting Enter. Your browser shows https://www.google.com, right? Think of it like telling your phone who to call. but have you wondered what is happening behind the scenes?

Ok, Let’s discuss the process, starting with the simple act of typing google.com into your browser. The address bar displays the URL https://www.google.com

let's break it into three parts:

  1. Protocol: The set of rules governing data transfer across the network.
  2. Subdomain: The ‘www’ we often see, acting as a specific gateway to the domain.
  3. Domain: The unique identifier for the website you’re trying to reach.
  4. path/page: The path to the file requested.

Now that we’ve written the URL let's press enter and start the journey to find out what happens after that.

DNS Lookup

When you type google.com, your browser doesn’t know where google.com lives on the internet. So, it asks a DNS server for help, like asking for a phone number when you only know someone’s name. The DNS server looks through its big list of domain names and tells your browser the IP address (a unique number) for google.com. This is like getting the phone number so your browser can call up Google’s server.

TCP/IP

TCP (Transmission Control Protocol) and IP (Internet Protocol). first TCP It is a data transfer protocol that sends a packet of data and waits for the recipient to tell him that the data has arrived in order to send the next packet. the IP It is a set of rules and agreements through which communication takes place over the Internet. They work in conjunction to establish a link between a client and a server and facilitate the exchange of data between them.

Firewall Check: The Security Gatekeeper

As the request travels, it might hit a firewall, which acts like a gatekeeper. The firewall examines the request based on rules set by the network administrators. It’s looking for anything suspicious(bad traffic), like a security guard checking IDs before letting people into a building. If the request looks safe, it’s allowed through

HTTPS/SSL

HTTPS (Hypertext Transfer Protocol Secure) is a safe version of HTTP, which is used to transmit data on the internet. It encrypts the data sent between your browser and Google's server.

SSL (Secure Sockets Layer)

SSL is the standard security technology for establishing an encrypted link between a web server and a browser. This link ensures that all data passed between the web server and browsers remain private and integral. SSL is an industry-standard and is used by millions of websites in the protection of their online transactions with their customers.

Here’s how SSL works when you visit a website:

  1. SSL Certificate: A website that uses HTTPS has an SSL certificate installed on its server. Think of an SSL certificate as a passport or a driver’s license that proves the website’s identity.
  2. Encryption: When you visit an HTTPS website, your browser checks the website’s SSL certificate to make sure it’s valid. If everything checks out, your browser uses the certificate’s public key to encrypt the data you’re sending to the website.
  3. Secure Connection: The website’s server decrypts the data you sent using its private key. Because the private key and the public key are a matched pair, the server is the only one that can decrypt your data.
  4. Data Transfer: Once the secure connection is established, your browser and the website can exchange information securely. This process happens in milliseconds.

Load Balancer

A load balancer is a technology that plays a crucial role in network traffic management. It’s like a traffic director for the internet, ensuring that no single server gets overwhelmed with requests. Here’s a deeper look into how a load balancer works:

  1. Traffic Distribution.
  2. Efficiency and Speed.
  3. High Availability.

Web server

Web server Is a combination of hardware and software that work together to deliver web content to users. Here’s a detailed explanation:

Hardware Aspect

The hardware is a computer that stores web server software and a website's component files (for example, HTML documents, images, CSS stylesheets, and JavaScript files). A web server connects to the Internet and supports physical data interchange with other devices connected to the web.

Software Aspect

On the software side, a web server includes several parts that control how web users access hosted files. At a minimum, this is an HTTP server. An HTTP server is software that understands URLs (web addresses) and HTTP (the protocol your browser uses to view webpages). An HTTP server can be accessed through the domain names of the websites it stores, and it delivers the content of these hosted websites to the end user's device.

Static vs. Dynamic Web Servers

  • Static Web Servers: These servers send hosted files as they are to your browser. They are called “static” because they don’t change the files before sending them to you.
  • Dynamic Web Servers: These include a static web server plus additional software like an application server and a database. They are “dynamic” because they can update the files before sending them to your browser.

Application server and database

Think of a web server as a librarian who gives you the book you ask for. Now, an application server is more like a detective. It doesn’t just hand you a book; it listens to your question and digs around for the answer.

So, when you go to google.com and search for something, here’s what happens:

  1. Starting the Search: You type in what you’re looking for and hit enter. This sends your question out to find an answer.
  2. Directing Traffic: A load balancer is the first to catch your request. It’s like a traffic officer who sees all the cars on the road and points them to the lane that’s moving the fastest.
  3. Finding Answers: Your request then goes to a web server, but it doesn’t stop there. The web server passes your question to the application server—the detective we talked about.
  4. Digging Deeper: Sometimes, the answer isn’t straightforward. If you’re looking for something specific, like a product on a shopping site, the application server might need to check the database—a giant filing cabinet full of information.
  5. Bringing It Back: Once the application server finds the answer, it sends it back to the web server.
  6. Displaying Results: The web server then hands the answer back to you, and voilà, you see the results on your screen.

Conclusion

thschema illustrating the flow of the request created when you type https://www.google.com in your browser and press Enter.





Alex Armasu

Founder & CEO, Group 8 Security Solutions Inc. DBA Machine Learning Intelligence

6 个月

Much thanks for your post!

Esraa Alaa

cs student &&intern in alx software engineer program && problem slover

6 个月

Really Helpful ?? ??

要查看或添加评论,请登录

社区洞察

其他会员也浏览了