Types of DNS Records
Types of DNS Records
Let’s learn the different types of DNS records and the steps to add DNS record in Cloudflare in this tutorial.
The Domain Name System (DNS) is a foundational component of the internet that helps convert human-readable domain names (like example.com) into IP addresses (like 192.0.2.1) that computers use to identify each other on the network. Without DNS, we would need to remember complex IP addresses instead of simple domain names.
What is DNS?
DNS acts like the phone-book of the Internet. When a user types a website name into their browser, DNS servers work behind the scenes to locate the exact IP address of the server hosting that site. This translation process ensures users reach the correct destination.
What are DNS Records?
DNS records are specific types of data entries stored in DNS servers. These records map domain names to IP addresses and define how traffic should be routed for services like email, web, or other protocols. Each type of DNS record has a unique role in managing and directing domain-related requests.
Common Types
Record Type | Description | Samples / Examples |
---|---|---|
A | Maps a domain name to an IPv4 address | example.com → 192.0.2.1 |
AAAA | Maps a domain name to an IPv6 address | example.com → 2001:0db8:85a3::8a2e:0370:7334 |
CNAME | Maps one domain name to another (alias) | www.example.com → example.com |
MX | Directs email to a mail server | mail.example.com with priority 10 |
TXT | Stores text information for various uses, like verification | v=spf1 include:_spf.google.com ~all |
NS | Specifies authoritative name servers for the domain | ns1.cloudflare.com |
SRV | Specifies service location for specific services | _sip._tcp.example.com |
PTR | Performs a reverse DNS lookup (IP to domain) | 192.0.2.1 → example.com |
DNS Enumeration Tool
Steps to Add a DNS Record in Cloudflare
- Login to your Cloudflare dashboard at : https://dash.cloudflare.com
- Select the domain name you want to manage.
- Click on the “DNS” tab in the side navigation panel.
- Click the “Add record” button.
- Choose the record type (e.g., A, CNAME, MX, TXT) from the dropdown.
- Enter the required values such as Name, Content (like IP or value), TTL, and other optional settings.
- Click “Save” to add the record.
That’s it.
When you add or update a DNS record in Cloudflare, the time it takes for the change to take effect. Some internet service providers cache DNS records aggressively, so updates may not reflect immediately for all users. TTL (Time To Live): If a record had a high TTL before the change, old data may be cached on some servers. Shorter TTL values like 300 seconds (5 minutes) allow faster propagation. Full DNS propagation across the internet can take up to 24–48 hours, in some cases.
Guide to protect website with Cloudflare: