Understanding DNS is simple. Just imagine you have to reach a place, but don’t know the way. You only know the name of the place. What will you do now?
You will ask for an appropriate address, you will take a cab, and the cab driver will drop you on at the location you were looking for. Right?
‘The place’ is the website. ‘The address’ is the domain name. And the driver is ‘DNS,’ who translates the address into routes and drops you where you are supposed to reach.
So, What Does the DNS Do Exactly?
It translates the domain name into an IP Address. Why? The reason being, the internet cannot understand names. The machine doesn’t understand the letters or the words. So, to make the machine understand what you are looking for – DNS translates the domain (https://www.milesweb.in/) into an IP Address.
As the IP Address is being generated, the browser redirects you to the web resources. Just how you provide the address to the driver, and the driver searches the route and drops you at the place.
Still Confused? Check These Steps –
- You type ‘MilesWeb.in’ in the browser
- The DNS requests an IP Address from the Nameserver
- The Nameserver provides the IP Address of ‘MilesWeb.in’
- Then the browser connects you to the web resources of the Website
- Now, you can see the home page and start browsing.
For a user, it seems like a one-step thing. But, for the internet, there are processes that are unseen to you.
These processes take place only because of the differences in the language we and the machines speak. If they could understand the human language, there wouldn’t be a need for an IP Address.
But, as there is a need, the clearance of the topic is equally crucial.
Plus, humans can definitely remember numbers, but it is a pain to remember the IP addresses of all the websites you want to visit.
A single mistake in an IP Address can actually lead to different results. That is why IP addresses make things simple & efficient for the browser and the visitor.
Related: Why Does Your IP Address Gets Backlisted.
Types of DNS Query & Servers
As I mentioned, there are processes that are running in the background just to fetch you results. These are the types of DNS queries or servers that are doing their job.
DNS Resolver
A DNS Resolver takes a client query and searches through its books to understand whether the page the client is looking for exists or not.
Root Server
Root server receives DNS resolver’s request and translates domains into its IP Addresses before returning it to the DNS Resolver to let it know the results of its request.
TLD Server
Later, the resolver requests the TLD server for the top-level domain of the client’s request – meaning ‘.com’, .in, .org, etc., and returns the result to the resolver server.
Authoritative Nameserver
Finally, the Domain Name Server Resolver requests an authoritative nameserver for the specific IP Address of the client’s query. Basically, authoritative name servers store individual IP Addresses, whereas root servers point to the storage of different IP Addresses.
DNS Root Servers
There are around 13 root servers that help the DNS fetch results and provide them to the user. These root servers store all the information of domains and their IP Addresses. They act like a shelf that has all books with respective genres.
Understanding DNS Records
There are various types of DNS Records used accordingly –
A Records – A record is used to point your domain to an IPv4 address. It points the domain to its respective web server.
CNAME Records – These records are used to point a subdomain to its primary domain.
MX Records – These records are associated with an email service. When you wish to have an email with @yourdomain.com, MX records are used to deliver the emails.
TXT Records – The records used to enhance email deliverability and security from spam emails sent by spammers.
How To Save Yourself From DNS Attacks
- Keep a check of all the websites you visit
- Install antivirus software that will block fraudulent acts
- Check whether the website has an SSL Certificate or ‘HTTPS in case
- Do not avoid any message that you get on visiting irregular websites
DNS Servers Can Be Set According To Devices
The devices you use can have specific DNS servers. That means each device you use will use its separate DNS.
DNS also configures its settings to the closest device. Meaning – the wifi router you use has one set of DNS Servers. So, every time you connect devices to WIFI, they will use the router’s DNS settings.
In case the PC or the laptop has its separate settings, then the laptop or PC will run on different DNS than other devices used to connect to the router.
Understanding DNS Caching
DNS caching in web hosting is one of the ways to provide requested results faster.
That means when the client requests a web page several processes occur in the background. Which includes the types of queries we talked about in the above section.
So, to not do the entire query process step by step and provide the results faster, DNS Caching stores the data connecting to the requesting client. The next time they request the same query, the DNS will return the request without having to go through the entire DNS lookup process.
This data can be cached from any location and, each location stores the information for a specific period.
Are DNS Requests Safe & Private?
DNS transfers the query in plain text, which then travels over the internet. So, the person who intercepts the request can know your activity.
These queries are not generally encrypted. Meaning, even if you use the resolver server, it is still not secured.
However, DNS over HTTPS and TLS can be used to encrypt the DNS queries and protect them from stalkers willing to read the activities.
Summing Up –
Understanding DNS can be a little tough, but not impossible.
It helps users land on a webpage by translating the IP Addresses of domains. And the translated IP Addresses are provided by the nameservers who store the database of domains with specific internet protocols.
The processes take place step-by-step. But to your eyes, it is only a one-step thing so that you can be redirected to the web resources with ease.