How are the websites displayed on the internet and how do you get the website by typing their name? These are Hayes questions that have only one answer, with the help of DNS. But what is DNS and what does it do?
What is DNS?
Before you ask, what is DNS? What is the abbreviation DNS? This three-letter word stands for Domain Name System. But what is the function of DNS?
When you create a website, you must specify a name that points to your site to register its domain. Later, this name is converted to IP with the help of DNS and is identified in the Internet space.
What is a DNS server?
In order for a domain to point to a website, it must first be added to the DNS Server. A DNS server is a large database that contains a set of related domains and IPs. For example, if the domain is google.com, the site will be resolved to IP with a DNS address of 184.108.40.206.
There are many DNS servers in hosting companies and organizations. These DNS servers are connected to each other. So all your hosting company has to do is add your domain name to the DNS server to gradually (in about 48 hours) synchronize with other DNS around the world. Moreover, DNSs play a key role in connecting domains to hosts.
What is a DNS error?
When you enter a URL, if the DNS server fails, the computer cannot enter the IP address for that URL. Because your system does not know how to access Google, you will see a DNS error message.
It should be said that if you have obtained your domain from two different companies and after registering your domain, you should change its DNS based on the service of your web hosting provider so that they can use their domain.
What is cloud DNS?
Disconnected DNS or sometimes slow DNS performance can cause big problems for you. With cloud DNS technology, you can reduce the risks associated with availability restrictions, security vulnerabilities, and performance restrictions.
How does a web browser find the right website?
When the site name is typed in the browser address bar, several different things happen to find and display the correct site. First, the domain name is translated to the IP address of the site. This will help you find the right website. Then, when the site is found, the web page file will be loaded and the site will be displayed. Moreover, By typing the URL in the browser address bar, the following steps are performed:
- First, the browser checks its cache to find the IP corresponding to the typed address. If this IP exists, it resolves it and displays the site.
- The browser will check the host files and DNS records (checking the DNS) If the domain name is not resolved.
- If there is no record in the host files, the browser will look for the default DNS server and if there is an entry for the domain name, it will display the relevant site.
- Now if the DNS server does not have a record for the domain, the browser will look for the server in other parts of the world and this will be done through a hierarchical structure.
- If the browser could not find any DNS server site, the domain name will not be resolved and the error will be displayed to the user. Now that you are familiar with the concept of DSN, we will examine its records throughout the article.
Ignoring DNS records by host files
This can be done by changing the file host. The file host is a file that exists on your computer and acts like a mini DNS server. Below you can see an example of this type of file.
# For example:
# 220.127.116.11 rhino.acme.com # source server
# 18.104.22.168 x.acme.com # x client host
It should be United that, the last line in this example maps the address 127.0.0.1 to localhost.