Domain Name System (DNS) is a hierarchical decentralized naming system for computers, services, or other resources connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities. Most importantly, it translates human-readable domain names to the numerical IP addresses needed for locating and identifying computer services and devices with the underlying network protocols.
By providing a worldwide, distributed directory service, the Domain Name System is an essential component of the functionality of the Internet, that has been in use since 1985.
The Domain Name System makes it possible to assign domain names to groups of Internet users in a more convenient way than previous addressing systems which relied on IP addresses.
DNS translates domain names to the numerical IP addresses needed for locating and identifying a computer connected to the Internet. For example, the domain name www.example.com might translate to 192.0.2.1.
Each level of the DNS hierarchy is called a "domain". Domains are organized in a tree-like structure, with each node on the tree being a subdomain of the parent domain. For example, the domain "example.com" is a subdomain of the "com" top-level domain (TLD).
DNS Records details
DNS records are the individual entries in a zone file. A DNS record is composed of a name, value, class, type, and TTL. The name is the label that you want to create or modify. The value is the actual data for that record. The class is almost always IN (for the Internet). The type depends on what record you are creating or modifying. The TTL is how long the record should be cached by other DNS servers.
Some of the more common types of records are:
A Record - Address Record, maps a hostname to an IP address
- Address Record maps a hostname to an IP address CNAME Record - Canonical Name Record used to alias one name to another
- Canonical Name Record used to alias one name to another MX Record - Mail Exchange Record, used to route email for a domain
- Mail Exchange Record used to route email for a domain NS Record - Name Server Record, indicates which DNS servers are authoritative for a zone
- Name Server Record indicates which DNS servers are authoritative for a zone PTR Record - Pointer Record, used for reverse DNS lookups
- Pointer Record, used for reverse DNS lookups SOA Record - Start of Authority, used to indicate the start of a zone of authority
There are many other types of records, but these are some of the most commonly used.
DNS Syntax Explained
The syntax for a DNS record is generally laid out like this:
name class IN type value
An example of this would be a type A record, which looks like this:
www IN A 192.0.2.1
This can be read as "the www record in the IN class is an A-type, and its value is 192.0.2.1".
The name can be anything you want, but it must be unique within the zone file. The class is almost always IN (for Internet), but can also be CH (for Chaosnet) or HS (for Hesiod). The type depends on what record you are creating or modifying. The value is the actual data for that record.
Creating DNS records
DNS records are generally created and modified using a text editor, such as vi or Notepad. Once you have opened the zone file in your text editor, you can simply add or modify the records as needed.
How to find DNS records?
To find DNS records, you can use a number of different tools. One of the most popular is the "dig" tool, which is included with most Linux distributions. To use dig, simply open a terminal window and type "dig +short example.com". This will return all of the A records for the domain example.com.
You can also use the "nslookup" tool to find DNS records. To use nslookup, open a command prompt and type "nslookup example.com". This will return all of the DNS records for the domain example.com.
If you are on a Windows machine, you can use the "ping" tool to find DNS records. To use ping, open a command prompt and type "ping -a example.com". This will return all of the A records for the domain example.com.
DNS records are an essential part of the Internet. Without DNS records, we would not be able to resolve domain names to IP addresses. If you need to find DNS records, you can use a number of different tools, such as dig, nslookup, or ping. Once you have found the DNS records you need, you can simply add or modify them as needed.