DNS (Domain Name System) records are the set of information that is stored on a DNS server and used to translate a domain name to an IP address. DNS records are used to control various aspects of a domain name’s behavior, including where email is sent, where a website is located, and how to handle requests for that domain. There are several types of DNS records, including:
- A (Address) records: These records map a domain name to an IP address. When someone types a domain name into a web browser, the browser sends a request to the DNS server to resolve the domain name to an IP address. The A record is used to provide the IP address that corresponds to the domain name.
- MX (Mail Exchange) records: These records specify the mail servers that handle email for a domain. MX records are used to route email to the correct server.
- CNAME (Canonical Name) records: These records are used to create an alias for a domain name. For example, you can use a CNAME record to point www.example.com to example.com.
- NS (Name Server) records: These records specify the name servers that are responsible for a domain. Name servers are the servers that hold the DNS records for a domain.
- TXT (Text) records: These records are used to store text-based data, such as SPF (Sender Policy Framework) records which are used to prevent email spam.
- AAAA (Quad-A) records: These records are similar to A records, but they map a domain name to an IPv6 address instead of an IPv4 address.
These are some of the common DNS records, there are other records as well like SRV, PTR, etc. These records are used by DNS servers to direct traffic to the correct location and to provide additional information about a domain name.