What Happens Whenever You Type a Website URL in the Browser?
Understand the logic behind website DNS resolution and never get amused again!
So, whenever we type any URL on our browser, have you ever wondered what actually happens? Even though we are used to the fact that whenever we want to search anything on google, we do so by typing google.com and we can look for our query.
Now the question arises, what does this actually mean? If we dissect the google.com URL, it comes out to be Google + com, so we can say that Google is a unique identifier, but what the heck is com? We generally come across a thousand other applications that have the .com extension. Don’t worry this article will give us a good idea about the meaning of the dissected URL.
Just to give you an overview, the entire URL is called a domain name, which gives us an easy way to remember the address of the website. Let’s discuss everything in detail. So just sit back, relax, and get ready to read the entire article.
Table of content
· How DNS works?
· How DNS is resolved?
· Why DNS Resolution is quick?
· Top Level Domain: Bit more
· What the heck is .xyz?
· Final Thoughts
· References
How DNS Works?
DNS stands for domain name system, and it can be said to be the backbone of the internet. Websites like www.google.com, www.medium.com, and www.facebook.com are called domain names to reach the content of these websites.
Actually, behind the scene, it operates based on an Internet Protocol Address (Commonly known as IP Address) which are complex combinations of numbers, generally IPv4 (10.123.123.1x) or IPv6. Every server has a unique IP address which we can simply type on our browsers like Google Chrome or Firefox to search for a server or maybe create an ssh connection to the servers.
So, whenever we register the IP address of a server to a domain name (e.g., mapping 1.2.3.4 to www.apoorv.com) an entry would be maintained at the Top Level Domain level, i.e., .com here. That will be used to map the DNS with the IP address every time someone tries to hit our domain name on their browser.
There are various servers involved in this entire process. The latency from making a request and showcasing the result is so low that we don’t observe any lag.
How the DNS Is Resolved?
Whenever we type a domain name into our browser, a series of hops take place. The end goal is to find the IP address of the server on which our application source code is deployed.
Consider it as a supermarket, so when you ask the help desk where you can find a specific brand of perfume, the assistant will redirect you toward the section where perfumes are located. After that, you ask for the specific brand counter where you will search for the perfume you are looking for.
Similar activity happens with the DNS: our request goes root DNS nameserver which redirects our request to the TLD server (abc.com -> com is the Top level domain/TLD server).
The TLD server then responds with an IP address linked with the requested domain. This specific IP address is the one that will be responsible for rendering the application.
Why DNS Resolution Is Quick?
Keep in mind that the DNS resolution is quick, but you still have to improve the round trip until the TLD resolves caching is implemented. The caching in general is a mechanism used to cache a specific data, which will just make sure that the data is served quickly. In other words, the data is memoized, based upon the input provided by the request.
On a similar note, the browser/operating system does this work for any specific request. Since they maintain a dictionary that stores the IP address against the domain name. As discussed earlier, it helps to reduce the round trip up to the top-level domain server. The latency is reduced. We can have a TTL (i.e., Time to live) after which the cache is purged.
You can check chrome://net-internals/#dns in the Google Chrome browser where you can also purge your DNS cache.
Bit More About Top Level Domain
Internet Corporation for Assigned Names and Numbers (ICANN), is the nonprofit organisation responsible for maintaining a standard throughout the internet.
So, the top-level domain is the extension to your entire domain name, like to abc.org, and so .org is TLD. Other popular TLDs are as follows:
- .gov: These are used by government organisations.
- .org: These TLD are used by organisations.
- .com: The .com is widely used, and they are used for commercial purposes. Most of the websites you come across use the .com extension.
- .net: This TLD is for network.
- .blog: .blog is TLD for blogging websites.
There are various other options, like .biz, .me, etc. but those above are some of the popular ones.
What the Heck Is .Xyz?
On various websites, you can find top-level domain(i.e., xyz) which is becoming quite popular nowadays. This top level domain came into public use in 2014. The theory behind the name xyz was that it seems to represent the X, Y and Z generations.
Since some of the premium domain names are a bit costly, xyz came up as a cheaper alternative. The purchase of such TLD is around 0.99 cent per year, and a similar amount is charged for renewing it periodically.
Daniel Negari is the male behind the xyz’s availability to server users. He claims it is a competitive choice and innovation to the market.
Some stats about xyz include the following:
- June 2, 2014: The TLD became available to the general public.
- November 2015: The .xyz reached 1.5 million domain name registrations.
- January 2016: Became sixth most-registered TLD.
- June 2016: The .xyz climbed up to the fourth position most registered global top-level domain.
Fun Fact: Alphabet, Google’s parent company, uses the domain abc.xyz, making it one of the largest companies to use the TLD.
As per the CEO of XYZ.com, his goal is to provide users with more choice since the domain namespace is cluttered. His main objective is to make xyz amongst the top choice whenever users plan to register for any blog, commercial website, etc.
Since the .com TLD is already occupied, whenever anyone plans to purchase a new domain with a specific name, it is already taken. So, according to him, it's time to reset the internet and allow users the privilege to purchase a domain of their choice.
Final Thoughts
So, even though you are a software developer or a generic user of the internet, you should have an understanding of how the domain name works. If we talk in generic terms, the code is deployed on a server that has a unique IP address attached to it.
All the websites, like facebook.com, medium.com, google.com, etc., all have some unique IP address associated with them, which is like our phone number. And it is very difficult to remember. Just compare it with the struggle of remembering your new friend's name versus remembering their contact number. Of course, their name is much easier to grasp.
Just to make our life easier, we have a domain name registered against the IP address. After reading this article, you have learned the definition of a domain name, different top-level domains, and the DNS resolution steps. Now we are confident enough that we understand the domain name, and if someone asks us, we would be able to explain its inner working.
For more enthusiastic people aiming to learn more about the topic, I have added a few references.
References
Want to Connect With the Author?Subscribe to my newsletter for the latest curated content.