Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,677 members, 7,823,912 topics. Date: Friday, 10 May 2024 at 06:06 PM

What Happens When You Type Google.com In Your Browser And Press Enter - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / What Happens When You Type Google.com In Your Browser And Press Enter (337 Views)

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? / Com In It's URGENT (2) (3) (4)

(1) (Reply) (Go Down)

What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 11:49pm On Jul 15, 2023
Typing any website domain name into your browser follows a set of rules which are standardized throughout the world.

I will go over each step of What happens when you type nairaland.com in your browser and press Enter, but first let’s start with a simpler example;

Suppose you were to type google.com into a browser. This is simpler because in the case of high traffic sites like google.com or facebook.com , your browser already knows the Internet Protocol (IP) address, of popular sites. The IP address is like your home address; it is the specific combination of numbers and letters that points to your house. Every website has an IP address, and the domain name is a memorable name for the IP address. For example, typing 74.125. 239.35 into your browser is the same as typing google.com`, but it is easier to remember google.com than a string of digits.

The domain name is linked to your IP address via an A Record, which I will cover when I discuss DNS. For now, understanding that 74.125. 239.35 is the same thing as google.com is enough. Typically, to query a domain name’s IP Address, your computer must access the internet in order to find a database filled with site’s domain name matched to their IP addresses. The browser doesn’t really care what the domain name is so long as it has an IP address matched to a given domain.
Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 11:51pm On Jul 15, 2023
Given how popular google.com is, it would not make sense for your browser to query the record of the A Record matching google.com IP address. So your browser comes equipped with domain name to IP address matches for all the popular sites such as Google, Facebook, YouTube, NYTimes.com, etc. This record is kept in the browser cache memory. Cache memory is simply the Computer’s method which makes retrieving data from the computer’s memory more efficient.

The browser’s cache memory holds popular sites, as does the computer’s Operating System (OS). If the browser does not have the IP address of the domain name in cache, it will query the OS to see if the IP address is on the OS’s cache memory.
Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 11:57pm On Jul 15, 2023
Domain Name System
What happens if neither the OS or the browser holds the IP address of a domain name in cache memory? Enter the Domain Name System.

Let’s use nairaland.com as an example. It is a site used by hundreds of visitors to Nairaland every week, and is probably visited a few thousand times a month. Given this, it is unlikely that your browser or OS will have the IP address that matches nairaland.com in cache memory. The act of pressing Enter with nairaland.com now begins a complex set of communications that span the globe and involve dozens of stops along the way. This all takes place within the blink of an eye.

Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 12:41am On Jul 16, 2023
The process I am about to explain occurs over the span of a few hundred milliseconds.

Once you’ve pressed Enter on holbertonschool.com and the IP address is not in the computer’s cache memory, the browser connects to the Domain Name System (DNS) through the internet. The Domain Name System is, in simple terms, the phonebook of the internet. DNS is not one thing but a system of bookkeeping which allows browsers to match the IP address of any domain name that exists. That’s a lot of domain name to keep track of, so the DNS works in steps.
Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 12:44am On Jul 16, 2023
Step 1: Recursive DNS resolver

Though your OS or your browser may not have the IP address of holbertonschool.com in it’s cache, the DNS Resolver may have it in it’s database. Put simply, the Recursive DNS resolver is a database run by your Internet Service Provider (ISP). This could be a system run by Comcast or Verizon, but it is only the first stop in the DNS.

Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 12:45am On Jul 16, 2023
Let’s assume that the Recursive DNS resolver does not have the IP address for nairaland.com. We should move on to Step two.

Note that some domain names have more than one IP address. Though the IP address may change, the domain never will not. The Domain Name System is an up-to-date index of those IP addresses.
Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 1:08am On Jul 16, 2023
Step 2: DNS Root Name server

The DNS Root Name server is actually step one if the ISP Resolver doesn’t have the IP address in storage. The Root is the .com or .gov for example, but there are actually dozens of Root names that a site can have. nairaland.com uses the most popular Root name, .com . Root names are also referred to as Top Level Domain (TLD) because it is the first part of the lookup process using DNS.

There are actually 13 Root Name servers in the world. Literally 13 physical locations of servers with databases that connect the domain name of whatever root name is in the domain name to it’s IP address.

Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 1:11am On Jul 16, 2023
Whatever the TLD is, your browser has been directed (or refered) to a TLD Name server. Now in step 3 we move to the Authoritative name server
Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 1:17am On Jul 16, 2023
Step 3: Authoritative Name Server

Once the Root name is known, the browser is directed to the Authoritative Name Server (ANS). This is the last stop.

When the good people at Nairaland created "nairaland.com" , they registered the name "nairaland" with a domain hosting company. This essentially took an unused IP address and mapped it to the name "nairaland" with a Top Level Domain of .com . This mapping is called an A Record .

The A Record is the main domain name that points to the IP address in use. You can put a "www" in front of the TLD, but "www" is a convention. Truly, the Third Level Domain can be anything you like.

When the name was registered and given an A Record it now mapped to the correct IP address and all this was recorded by the hosting company in a database. The Root level name took us to the correct ANS, and the ANS has the ip address for "nairaland" mapped to its IP address.

Now that IP and domain name are mapped, the results are returned to the browser. The browser substitutes the domain name for the IP address in the browser and we are shown the contents of the static web page. This is the web server which hosts the contents in a server with the IP Address of "nairaland.com" .

Now that your browser knows the correct IP address, it puts "nairaland.com" = IP Address in its cached memory so the next time you type "nairaland.com" into your browser it checks if it knows the IP address of "nairaland.com" . Now that it does, typing "nairaland.com" in your browser and pressing Enter simply queries the browser’s cached memory and goes to the affiliated IP address.

Below is a simplified diagram showing the DNS and connection to server via IP address

Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 1:21am On Jul 16, 2023
Servers, how do they work?

On other end of the internet from the user (often referred to as the Client side) at the IP address for nairaland.com is a physical server. The physical server can be at the physical address of the site’s administrator, but for smaller organizations it is most likely on a server farm along with thousands of other servers.

A server has several components which I will cover one at a time. For an example of the way in which a server is broken down, let’s look at Amazon.com

Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 1:23am On Jul 16, 2023
Amazon sells thousands of products. The template for any product page includes a product description, reviews and an ability to conduct a transaction over the internet.

Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 1:24am On Jul 16, 2023
The parts of the page that never change, such as the header, footer and look and feel of a page are served on the Web Server as the static website.

It is important to understand that the converse of this would be that each Amazon page would literally be drawn out by a developer one at a time. This would be an incredibly inefficient system, as each aspect of the site’s pages would be a copy of the main template with the product specific information and reviews added in manually.

Of course Amazon knows that this wouldn’t be feasible, so they employ a Server model that joins together the static web template with code functionality and database driven content creation.

Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 1:26am On Jul 16, 2023
Web Server

The web server is a distinct part of a server setup. Often used interchangeable with Server the Web Server is responsible for displaying the markup language, HTML and CSS, as the static website. Since every browser automatically runs HTML and CSS, this part of the server displays the look of the website, but rarely includes any real functionality. That comes with the Application Server.

1 Like

Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 1:27am On Jul 16, 2023
Application Server

The Application Server is responsible for compiling the site’s Codebase, which is any non HTM, CSS or Javascript code that the site needs to run it’s non static components. The reason that Javascript is not included is because it is standard for every browser to run Javascript without any 3rd party tools.

The codebase is most often PHP, but in the past Java Applets were run through the application server. Technically, any language could be run through the App Server, even C, but in practice most site’s use the newest languages for its codebase.

In our Amazon example, the codebase is seen in the e-commerce functionality, as well as how reviews are handled and pictures are displayed.

That brings us to the Database.
Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 1:28am On Jul 16, 2023
Database

The database (db) is the last component of a server. Simply put, a db is a structured set of data held in a computer, especially one that is accessible in various ways.

Most often, the db holds data needed to make a site functional. For Amazon, the product description,images and reviews are kept in a large database. When a particular product is chosen, the associated information and reviews are queried in the Database by the Application Server.

Together the DNS tells the browser what the IP address is, and the Client is connected to a Server via its IP address. Then the different components of the server works together to present a live, functional website.
Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 1:29am On Jul 16, 2023
Scalability

So far we have covered the Domain Name System and Servers, but there are additional elements on the server end . These elements include the load balancer, SSL Certificate and Firewall.

Once a site becomes more highly trafficked, it is time to add additional power to your site. This is done by adding more servers to the site. This helps increase the number of visits that the site can accommodate and helps keep downtime to a minimum when updating the Codebase (When one server is done a backup server is still hosting the site).

When a website is scaled up with more servers, additional concerns become balancing the workload between servers. Also, increased traffic means increased chances of infiltration by hackers, so security becomes paramount.
Re: What Happens When You Type Google.com In Your Browser And Press Enter by stanarthur: 1:31am On Jul 16, 2023
Load Balancer

A load balancer is used when one website (domain name or IP address) uses more than one server. The load balancer is the front facing program that acts as a filter between the Client, the internet and the server.

A load balancer acts as the “traffic cop” sitting in front of your servers and routing client requests across all servers capable of fulfilling those requests in a manner that maximizes speed and capacity utilization and ensures that no one server is overworked, which could degrade performance. If a single server goes down, the load balancer redirects traffic to the remaining online servers. When a new server is added to the server group, the load balancer automatically starts to send requests to it.

Re: What Happens When You Type Google.com In Your Browser And Press Enter by airsaylongcome: 3:05am On Jul 16, 2023
Always include your reference

https://medium.com/@1034/what-happens-when-you-type-holbertonschool-com-in-your-browser-and-press-enter-13af27817d21

2 Likes

(1) (Reply)

How To Open Thunderbird Files Into Any Editions Of Outlook? / Need Someone To Code Something For You? / I'm Encountering Error As A Newbie On Python Language

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 34
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.