18 March, 2023

What Is DNS? Common DNS Types and How DNS Works

Content
Quick summary: DNS (Domain Name System) is the system that resolves domain names. It works like a phone book, linking a domain (such as "mona.media") to its IP address (such as "192.168.16.142"), so users can visit a website without remembering a complicated string of IP numbers. Besides resolving domain names, DNS also handles security management, load distribution and routing to make sure queries are fast and secure.

“What is DNS?” – In fact, in the world of technology in general and website design in particular, even people who are not deep into IT may have heard of it and wondered. So MONA Media will share the most complete, easy-to-understand information about DNS after you buying a domain as well as the “enormous” impact of the DNS domain name system on today's Internet.

What is DNS? 

DNS (Domain Name System), also known as the domain name resolution system, acts like a notebook linking a domain (such as “mona.media” to its IP address (such as “192.168.16.142”). Its main purpose is to let users easily visit the website they want without remembering a complicated IP string.

In addition, the Domain Name System also handles security management, load distribution and routing to make sure DNS queries are fast, reliable and more secure on the network.

DNS will become even more important when IPv6 (Internet Protocol version 6) becomes widespread and replaces IPv4 completely. – Võ Nguyên Thoại – CTO Mona Host

What is DNS?

What is DNS used for?

DNS is just like a phone book. That means instead of remembering dozens of phone numbers with a pile of digits, you only need to remember the names of their owners. In this example, the phone number is the an IP address of the website, and the owner's name is the domains of website itself.

For example, when you type “www.google.com” into the browser, the DNS server fetches the address of Google's server, “74.125.236.37”. Then you see Google's home page load in the browser you are using. That is the Domain Name System resolution process.

In addition, each DNS also remembers the domains it has resolved, and on later visits, the Domain Name System uses them first. That is why you can use many online services such as researching information, watching films, playing games,… faster and more easily.

How does DNS work ?

DNS works step by step according to its structure. The first step is a query to get information, called a “DNS query” .

Back to the example of searching for the website www.google.com in a web browser!

  • First, the DNS Server looks for resolution information in the file hosts – a text file in the operating system responsible for converting hostnames into IPs.
  • If it finds no information, it goes on to look in the cache – the temporary memory of hardware or software. The most common places this information is stored are the browser cache and the cache of ISP (Internet Service Providers).
  • If no information is received, you will see an error code.

How to use DNS?

In the definition above, we can see that DNS Servers are all connected to each other. At this point many of you will surely be confused, unsure how to use them. Let MONA Media help untangle this for you!

Domain Name Systems have different resolution speeds, so users can choose which DNS Server to use. You can use the default Domain Name System of your Internet service provider, or another free or paid DNS; either is fine. But note that when using other DNS Servers, you must change the setting on your computer.

Steps to change the DNS settings on a Windows computer

  • Step 1: Select Start -> Setting -> Network Connection
  • Step 2: Double click on Local Area Connection, choose Properties -> Internet Protocol (TCP/IP) -> Properties
  • Step 3: Enter the DNS Server values you want in the 2 fields “Preferred DNS Server” & “Alternate DNS Server”.

How to change the Domain Name System on a Mac

  • Step 1: Choose the Apple menu (apple logo) in the top left corner of the screen -> Click System Preferences. The System Preferences window will appear; choose Network.
  • Step 2: Click Advanced… to open the advanced options. Go to the DNS tab and click the “+” icon once to add the Preferred DNS.
  • Step 3: Click “+” once more to add the Altemnate DNS -> Click OK and Apply to save the changes.

Note: Hackers can use Domain Name System servers to steal your personal information. So check website addresses carefully, and avoid fake websites and software of unknown origin.

What types of DNS records are there?

A Record

The simplest DNS Record and the most widely used, pointing a website name to a specific IP address.

You can add a new name, a Time to Live (the time before the record automatically refreshes) and Points to (which IP it points to).

CNAME Record

A record that gives one or more other names to the main domain.

You can create a new name, set which original name it points to and set the TTL.

MX Record

A record that specifies which Server handles the Email for that domain.

You can point the domain to a Mail Server, set the Priority and set the TTL.

TXT Record

A record that lets you store text-format information about the domain.

You can add a new host, TXT value, TTL, Points to.

AAAA Record

Like the A Record, but the AAA Record is used to point a domain to an IPV6 Address.

You can add a new host, IPv6, TTL.

NS Record

The DNS Server Records of the domain, which let you specify the Name Server for each subdomain.

You can create a new host, Name Server name, TTL.

SRV Record

A special record in the Domain Name System, used to specify exactly which service runs on which port.

You can add Priority, Name, Port, Points to, Weight, TTL.

SRV Record

Common types of DNS Servers and their roles

In practice, about 4 common DNS servers take part in the domain name resolution system, including:

Root Name Servers

Also often called the Name Server. This is the most important Server in the DNS hierarchy. You can think of the Root Name Server as a library that points your search in the right direction.

In the actual process, after receiving a request from the DNS Recursive Resolver, the Root Name Server responds with which top-level domain name servers (TLD Name Servers) it needs to look in.

TLD Nameserver

When you want to visit Google or Facebook, the extension is usually “.com”, right? Well, we want you to know that it is one of the Top-level Domain . And the server for this type of Top-level domain is called the TLD Nameserver. It manages all the information for a common domain extension.

In sequence, the TLD Name Server responds to the DNS Resolver, then refers it to an Authoritative DNS Server – the official source of that domain's data.

See more: What is a Name Server?

Authoritative Nameserver

When the DNS Resolver finds the Authoritative Nameserver, that is when domain resolution takes place. The Authoritative Name Server holds the information on which address the domain is attached to. It gives the Recursive Resolver the required IP address found in its list of records.

Types of DNS servers

DNS Recursor

As mentioned above, this “trusty sidekick” works like a diligent employee, tasked with fetching information and returning it to the browser so it finds exactly what it needs.

In other words, the DNS Recursor is responsible for contacting other Servers to respond to the user's browser. Of course, while fetching information, it sometimes needs help from the Root DNS Server.

Why are DNS Servers vulnerable to attack?

Go back to the section How to use DNS, did you notice our small warning about how “fragile” and vulnerable to attack it is? Let MONA explain why!

The process of translating a domain into an IP address is called Domain Name System resolution.

When someone enters a domain, for example www.google.com into a Web Browser, the browser immediately contacts a name server to get the corresponding IP address. There are 2 types of name servers:

  • Authoritative name server: Stores the full information about a zone
  • Recursive name server: Answers Domain Name System queries for Internet users and stores DNS responses for a period of time.

So the issue we want to highlight lies with recursive name servers.

When a recursive server receives a response, it caches it to speed up later queries. The advantage of caching is fewer information requests, but it also creates a “serious” risk: vulnerability to man-in-the-middle attacks.

Through these “cloak and dagger” battles, cybercriminals can:

  • Hijack email
  • Interfere with Voice Over IP (VoIP)
  • Impersonate websites
  • Steal login credentials and passwords
  • Extract credit card data and other confidential information
Why is DNS vulnerable to attack?

Understanding DNS leaks

1. What is a DNS leak?

A DNS leak is when a user's Domain Name System information is exposed to the internet in an unsafe way. Normally, when you connect to a VPN (Virtual Private Network), DNS requests are routed through the VPN's DNS server to ensure privacy and security.

However, in a Domain Name System leak, your DNS information may be exposed to an unsafe DNS server or to your ISP (Internet Service Provider).

2. Why is a Domain Name System leak dangerous?

A DNS leak can have unpredictable consequences. Here are some of the risks:

  • Exposing online activity: Information about the websites you visit and your IP address can be exposed, letting others track and see your online activity.
  • Risk of sensitive information theft: including usernames, passwords, bank account details or credit card information,…
  • Tracking and tracing: Third parties can build profiles and track your behaviour on the internet for targeted marketing, ad targeting or tracing your online activity.
  • Restricted access: Based on leaked Domain Name System information, organisations, government agencies or internet service providers can identify you and restrict your access to certain websites or services.
  • Threats to cyber security: A DNS leak can let intruders use attack techniques such as DNS spoofing or man-in-the-middle attacks to carry out malicious activities like blocking or modifying data in transit.

3. Causes of DNS leaks

There are many causes of Domain Name System leaks, such as:

  • Errors switching from IPv4 to IPv6: IPv6 is newer and more secure than IPv4, but not all VPN servers support IPv6. If you send an IPv4 request through an IPv6 tunnel, your information may leak.
  • Windows features: Windows has a feature called “Smart Multi-Homed Name Resolution” that speeds up the internet by automatically choosing the fastest DNS server. However, this feature can make DNS requests bypass the VPN and go straight to the ISP12.
  • Incorrect configuration: Network settings that are insecure or incompatible with the VPN or proxy.

4. How to check for DNS leaks

Domain Name System leak

To find out whether your server has a Domain Name System leak, try the checks below:

How to check for DNS leaks from the browser

Many free online tools help you check whether your DNS information is leaking. The most widely used is DNS Leak Test. Here are the steps to use it:

  • Step 1: Go to https://www.dnsleaktest.com/
  • Step 2: Choose “Extended test”. The tool will display a list of the DNS servers it finds, including their IP addresses and owners.
  • Step 3: Open the ipMagnet website in your browser. The ipMagnet page will start showing data from your connection.
  • Step 4: Use VPN software to connect.

Checking for Domain Name System leaks via Torrent

You can use Torrent to check with the following steps:

  • Step 1: Turn on the VPN on your device to make sure you are using a secure VPN connection.
  • Step 2: Download and share via Torrent. While sharing, open your BitTorrent client to see the list of IP addresses involved in the torrent sharing.
  • Step 3: Look at the list of IP addresses shown in the BitTorrent client and compare them with the IP address of the DNS server you are using. If the IP addresses in the list do not match the DNS server, there may be a DNS leak.

5. How to fix DNS leaks

Use a private DNS server

  • Set a private DNS server on your computer or device. Popular private DNS servers include Google DNS (8.8.8.8, 8.8.4.4) and Cloudflare DNS (1.1.1.1, 1.0.0.1).
  • On Windows: Go to “Control Panel” >> “Network and Internet” >> “Network and Sharing Center” >> “Change adapter settings“. Right-click the current network connection and click “Properties“. Choose “Internet Protocol Version 4 (TCP/IPv4)” and click “Properties“. Choose “Use the following DNS server addresses” and enter the private DNS server. Click “OK” to save the configuration.
  • On macOS devices: Go to “System Preferences” >> “Network“. Choose the current network connection and click “Advanced”. Choose the “DNS” tab and add the private DNS server by clicking “+” below the existing DNS server list. Then click “OK” to save the configuration.
  • On mobile phones: Go to the Wi-Fi or mobile network settings and edit the DNS settings to use a private DNS server.

Use a VPN

Use a VPN (Virtual Private Network) service to encrypt internet traffic and route DNS requests through the VPN's DNS server.
When you are connected to a VPN, DNS requests are protected and do not leak your personal information.

Turn off IPv6 (if needed)

If you get Domain Name System leaks when using IPv6, you can turn off IPv6 on your computer or device.

  • On Windows devices: Go to “Control Panel” >> “Network and Internet” >> “Network and Sharing Center” >> “Change adapter settings“. Right-click the current network connection and choose “Properties“. Disable “Internet Protocol Version 6 (TCP/IPv6)“. Click “OK” to save the configuration.
  • On macOS: Go to “System Preferences” >> “Network“. Choose the current network connection and click “Advanced“. Choose the “TCP/IP” tab and change “Configure IPv6” to “Off“. Then click “OK” to save the configuration.

Note that fixing Domain Name System leaks may differ depending on your operating system and device. Basically, you need to make sure you are using a private DNS server or a VPN to route DNS requests and avoid leaking personal information.

See more: Overview of IPv4 and IPv6

The most popular DNS list today

DNS Google

DNS Google (hay Google Public DNS) is a public DNS service, well known and widely used around the world. It is highly rated for speed, reliability and resistance to attacks from malicious websites.

→ To use Google Public DNS Server, change your network settings to the IP addresses below:

  • Preferred DNS Server: 8.8.8.8
  • Alternate DNS Server: 8.8.4.4
Google publish dns server

DNS Cloudflare

Cloudflare DNS is a DNS service provided by Cloudflare. It works as a recursive name server, turning a website's domain (e.g. mona.media) into its IP address (e.g. 192.168.24.21) so the website works normally and you can access it.

Network settings to use Cloudflare DNS:

  • Preferred DNS Server: 1.1.1.1
  • Alternate DNS Server: 1.1.1.2

Pros: Fast, highly secure and completely free. It also supports WARP for safer and more private web browsing.

Cons: Not as popular as Google Public DNS yet.

OpenDNS

OpenDNS is a leading public Domain Name System Server with no downtime, offering a better browsing experience and protecting computers from attacks on the Internet.

→ To use OpenDNS Server, change your network settings to the IP addresses below:

  • 208.67.222.222
  • 208.67.222.220

In addition, OpenDNS also offers 2 free customisable solutions: OpenDNS Family Shield (pre-configured to block adult content) and OpenDNS Home (with custom filters that protect your computer from hackers and phishing).

→ Configure your network settings to use OpenDNS Family Shield:

  • Preferred DNS server: 208.67.222.123
  • Alternate DNS server: 208.67.220.123

Comodo Secure DNS

Comodo Secure DNS gives you a better, safer browsing experience without installing any extra software or third-party program. You can browse easily and enjoy fast speeds without being bothered by malicious websites or ads.

→ To use Comodo Secure DNS, replace your network settings with the IP addresses below:

  • Primary DNS Server: 8.26.56.26
  • Secondary DNS Server: 8.20.247.20
Comodo Secure DNS

Frequently asked questions

How does the Domain Name System work?

When you type a domain into your browser, the browser sends a request to the nearest DNS server. That Domain Name System server checks its database to find the IP address that matches the domain.

The DNS server then returns the IP address to the browser, and the browser uses that IP address to connect to and display the corresponding website.

How do you fix slow DNS?

To fix a slow Domain Name System, you can take the following steps:

  • Use a fast DNS server: Change your DNS settings to use a fast DNS server such as Google DNS (8.8.8.8, 8.8.4.4) or Cloudflare DNS (1.1.1.1, 1.0.0.1).
  • Clear the DNS cache: Clear the DNS cache on your computer or browser so the latest Domain Name System information is downloaded.
  • Check your network configuration: Make sure your network configuration is working correctly and nothing is slowing down domain resolution.

What is Primary DNS?

Primary Domain Name System can be understood as follows:

  • It acts as the main DNS server, keeping the initial Domain Name System queries of devices on the network running smoothly.
  • It is usually configured on network devices such as routers, computers,…
  • Primary DNS looks up the required information when a device needs to resolve a domain into an IP address.

What is a DNS service?

A Domain Name System service is the system that manages domains on the Internet. It provides a way to translate easy-to-remember domains into IP addresses and back again, and it makes searching and access easier for devices and applications on the Internet.

Above is the answer to the question “What is DNS?” along with a detailed overview of this system. We hope the information MONA Media shared above is useful to you and helps you make the most of the Domain Name System.

FAQ

How does DNS work?
When a user types a domain into the browser, the DNS Server first looks for resolution information in the hosts file, then in the cache (temporary memory of the browser or ISP). If found, the browser connects to the corresponding IP address; if not, an error code is displayed.
What are the common types of DNS records?
Common DNS record types include: A Record (points a domain to an IPv4 address), AAAA Record (points to IPv6), CNAME Record (gives another name to the main domain), MX Record (specifies the server that handles email), TXT Record (stores text information for the domain), NS Record (specifies the Name Server) and SRV Record (specifies which port a service runs on).
About The MONA Group: Founded in 2016, with more than 200 staff, MONA has delivered 14,000+ projects with an 85% client retention rate. MONA provides website design, full-scope SEO, custom software and AI automation solutions for businesses. Consulting hotline: 1900 636 648. Explore MONA AI Agent suite and MONA SEO services.
About the author

CEO & Founder · The MONA

Founder of The MONA, who built a services company of 200+ staff with 14,000+ projects delivered. Khánh Hùng shares how he thinks about building systems that run themselves, automating a business, and the real lessons from delivering projects at MONA.

Views 1,5K
Rate this article 4,9/5 · 11 ratings

Professional website
design services

Own a website with a beautiful, 100% exclusive design and a lifetime warranty, with the ability
to expand features flexibly as your business grows, starting today!

Contact Mona

    MONA có riêng một Người "Bạn Thân" cho bạn - Người Account sẽ đồng hành, hỗ trợ, hướng dẫn, đặt đồ ăn cho bạn mãi mãi, từ đây về sau!
    MONA promises never to use your information for sale or SPAM
    Đội MONA tư vấn hệ thống quản lý giáo dục trực tuyến
    Hỏi đáp giáo dục 4.0
    Tạo cuộc hẹn miễn phí với MONA để giải đáp và tư vấn mọi thắc mắc về giải pháp số hoá ngành giáo dục
    Thời lượng cuộc hẹn
    45 Phút
    Ngày và giờ
    Thứ 2, ngày 25 tháng 12, 2023
    [9:30 - 10:15]

      Chọn ngày và giờ
      Khung giờ
      Back
      Hãy cho MONA biết bạn là ai
      0:00