Domain Name System (DNS)

Domain Name System (DNS)

Each Internet-connected device has an IP address associated with it. This IP address is unique for every network-connected device. However, IP addresses are long strings of letters and numbers, which makes them hard to memorize. DNS, or domain name system, provides a system of mapping each human-friendly domain name to the corresponding IP address.

For example, using DNS, the domain can be mapped to (IPv4) and 2606:2800:220:1:248:1893:25c8:1946 (IPv6).

While IP address lookups are the most prominent DNS feature, the system maintains much more information about domains in various records.

What are the different DNS record types?

There are a lot of different record types. Some of the most commonly used are:

  • A/IPv4 Address: Returns the 32-bit address mapping a domain name to the host server.
  • AAAA/IPv6 address: Returns the 128-bit address mapping a domain name to the host server.
  • MX/Mail exchange: Returns a list of email transfer agents associated with the domain.
  • CNAME/Canonical name: Provides a new name for which to continue the lookup.
  • TXT/Arbitrary text: Can store any text but is also used in email validation mechanisms.

What purposes does DNS serve?

  • DNS acts as a phone book that allows users to access websites based on a name rather than using a sequence of letters and digits.
  • DNS allows the IP address to change behind the domain name. This feature allows web resources to move across devices and servers while keeping the domain name and, consequently, the same URL.
  • DNS is also location-aware. People living in different geographical locations can receive different IP addresses for the same domain based on the nearest server. This behavior improves the speed and reliability of the connections.

Write clean and secure code with DeepSource

Powerful static analysis that takes 5 minutes to set up and helps you fix code health and security problems on every pull request.