What are DNS Records?
The Domain Name System (DNS) gives resources stable human-readable names to solve various potential internet problems; for example, it translates domain names to IP addresses so users don’t have to remember long numbers to access websites. Administrators can create records of several standardized types, and each type solves a specific problem. If you ever wondered how DNS records work, what each record type does, and how to manage DNS records, this article is the right place to start.
What are DNS records?
DNS records are essentially the instructions found on authoritative DNS servers and stored in their zone file. All domains need to have the few necessary records that allow a user access to a website, but there are many different DNS records involved. These include mail records, website records, and informational records, among others. If you’re interested in learning more about the inner workings of DNS, check out our DNS root servers post.
Each DNS record has different components: the domain name; time to live (TTL), i.e. the time in seconds in which the client can store the record in cache before the information must be requested again from the DNS server; class, which is set to IN (internet) for common DNS records that involve hostnames, servers or IP addresses; the record type; and the type data, which is the information according to which the domain can be resolved.
Why are DNS records important?
DNS records are a key component of web hosting and managing domain infrastructures; information about everything on the internet is held in DNS records. As organizations scale, managing domain names, migrations, and mail servers becomes crucial for maintaining key business functions.
For an organization to effectively manage its DNS, administrators must take a thorough look at organizational necessity and understand the types of servers and managed DNS solutions that are most appropriate for the organization.
Most common types
There are many types of DNS records, but these five are what you’ll need to get started. If you are working with services that require other DNS records, like Cloudflare, the service will usually provide special instructions.
- A and AAAA records link a domain to an IP address (IPv4 for A, IPv6 for AAAA). Without these DNS records, your URL won’t point to your server’s IP address and won’t show your website. This is also called “not resolving.” In addition to the main domain name, you will likely add an A record for your hostname and any subdomains that resolve to a different server. The Data field of an A record will always be an IP address.
- ALIAS records function much like DNS records – CNAME listed below. However, where CNAME records are used for sub-domains, ALIAS records are used to point the main domain name (or apex domain, like example.com) to a hostname. Nameservers that support ALIAS records will then resolve the subsequent IP address of the hostname to direct traffic correctly.
- CNAME records are aliases that point an entry back to the main domain. If a browser requests a page from that subdomain, the server will route the request to the proper directory. If you frequently create records for subdomains, you may wish to add a wildcard CNAME to cover any requests for subdomains without their own records. You can create a wildcard by entering an asterisk in the Name field.
- MX records determine how mail is handled for your domain. When creating an MX record, data will contain two fields: Priority and Exchange. Priority always will be a number. Mail will be routed to the lowest numbered (highest priority) MX entry. Use the settings recommended by your control panel or email provider. Exchange is the server that mail will be directed to.
- NS records specify the nameservers for the domain. Remember that the authoritative nameservers are specified at the registrar — if a WHOIS search returns different nameservers than what you’ve entered here, your entries in your Liquid Web account will have no effect.
How to manage DNS Records
You can manage DNS records by using the web UI of your domain provider or by running your own DNS server. Using the web UI of your domain provider is the easiest option. It will present you with a list of records and allow you to create, update, and delete them.
Conclusion
DNS records let you define domain names for everything connected to the internet, including IP addresses, other domain names, email addresses, and anything you can represent in a short text. NS records even include the very mechanism that binds the distributed DNS network together. Since DNS is essentially a huge distributed lookup table, you can use it for all kinds of data you want to make accessible via a domain name, including addresses for mail or DNS servers, proofs of ownership, and more obscure things like CIDs for IPFS resources.