I assume that you have already heard the jargon associated with a domain and web hosting, viz, DNS, Nameservers, IP address, CNAME, MX Record, etc. It’s not uncommon that you’re not yet familiar with the terms and their meanings, and hence, you face difficulties in rightly configure your domain and DNS records.
In this guide, you will learn the details of DNS records, zone files, record types, and how the records work. We will also discuss domain registrar, nameserver (NS record), and DNS lookup.
Systematically this post contains DNS management basics – records and types as follows.
- What is DNS and how it works
- Domain registrar, zone files and nameserver
- DNS records, types and their uses
What is DNS and How it Works
DNS stands for domain name system. DNS is primarily an internet service that translates alphabets (domain name) into numbers (IP address), but not limited to this single function. DNS is also a database that keeps various records associated with a domain name to help in multiple functionalities.
Primarily, the domain name system connects human beings with the browser and the servers. Websites are stored in servers that can be identified with numerical values, which is known as internet protocol (IP) address. However, we humans find it difficult to remember the complex strings of numbers, and hence, we are being served with the domain names. When we enter a domain name in the browser’s address bar, the browser translates it into an IP address associated with the website to find the web content in the specific server and to deliver for our consumption. Browsers can find the corresponding IP address for the specified domain name from the record available in the domain name system (DNS).
Besides the IP address, a domain name system contains various information associated with the domain names. This can be the record associated with the registrar of the domain, or an email account created with the domain name, or any essential information that can verify the ownership of the domain.
The two essential records a DNS contains are –
- The record about the registrar of a domain
- The nameservers of the domain
Registrar and Nameservers
A domain registrar is a corporation that is authorized to sell domain names. For example, Namecheap or BlueHost is a domain registrar. You can obtain a domain name from the registrar by paying the registration fees.
A domain registrar may either offer you only the domain registration services or both web hosting and domain registration services. Your domain registrar and web host don’t need to be the same company. You have the option under the ICANN (International Corporation for Assigned Names and Numbers) regulations that you can choose any other hosting service provider to host your website other than your domain registrar. If your domain registrar and web hosting service providers are two different businesses, you require to updates the nameservers of your domain in your account at the registrar’s website so that you can manage the domain at the hosting service provider’s website. You’ll get the nameservers from your hosting service provider.
Nameservers play an important role in both domain registration and web hosting.
You may wonder what is a nameserver?
A domain nameserver is a network service that keeps the information about the domain name and the corresponding IP address. In other words, a nameserver points a domain name to the server of a website. Hence, it plays the most crucial function in helping the browsers to find the content of the specific website from the particular server.
Most of the hosting service providers will provide you with a set of a minimum of two nameservers, namely, primary and secondary nameservers. However, you can manage more nameservers in the category of secondary nameservers, such as secondary1, secondary2, secondary3, etc.
If your domain registrar and hosting service providers are two different companies, you need to first ask for the required nameservers from the hosting service provider and then to update the nameservers by putting the values in the specified box in your account at the registrar’s site. After updating the same, you can use the domain for the intended website.
There may be some other situations where you want to transfer your domain to another registrar. In such a case, you will also need to update both the nameservers and A records.
I love to recommend to purchase the domain from a registrar where you can also host your website. You also may have some other benefits.
DNS Records, Types and Uses
Depending upon the usability of a domain (as the owner of the domain determines), there can be numerous records in a DNS. The prominent are –
In DNS record files, ‘A’ stands for an address that corresponds to a domain name to IP address (in IPv4). In other words, an A record helps in finding the server where the website at a specific domain name is hosted. It is the simplest and first primary record in a DNS file.
You can use multiple A records for a single domain to provide redundancy. Multiple names can point to a single IP address in the cases where an IP address has many ‘A records’. Such a case inform about many subdomains.
CNAME stands for Canonical Name that can be used in a DNS file to alias one name to another. For example, when you have both example.com and www.examle.com pointing to the same website hosted in the server, you need to create A record for example.com pointing to the server IP address, and CNAME record for www.example.com pointing to example.com. This will be resulted in pointing example.com to the server IP address, and www.example.com to the same IP address via example.com. When the IP address is needed to be changed, you only require to update it by editing the A record for examle.com. The www.example.com will automatically inherit the changes..
An NS record stands for the nameserver record in a DNS. It specifies the actual server that contains all DNS records for the specific domain. NS records play important role in establishing a relation between a domain and the server where the website pointing to the domain is hosted.
A domain can have multiple NS records that can specify primary and backup (secondary) nameservers. The primary nameserver can be only one while there can be several backups.
Since the NS records are directly controlled by the server, you can not edit the NS records for your domain in the DNS panel. It only can be updated while you are migrating from one web server to another. The following are examples of NS records in a DNS zone. While the first indicates the primary nameserver, the second is for the secondary nameserver.
An SOA record stands for the start of the authority record. It stores information in a DNS zone about the zone itself and about other DNS records. It contains data to control a zone transfer. The information stored in an SOA record includes –
- The name of the servers that supply data for the zone
- The information about the administrator of the zone
- The current version of the data file
- The time-to-live (TTL) records including
- The default number of seconds for the TTL files on resource records
- The number of seconds a secondary name server should wait before checking for updates
- The number of seconds a secondary name server should wait before retrying a failed zone transfer
- The maximum number of seconds that a secondary name server can use data before it must either be expired or refreshed
You may wonder what is a zone? A DNS zone is a distinguished part of a domain for which each individual DNS record is responsible. A DNS can be partitioned into many zones with delegated administrative right.
An MX record in the DNS zone file stands for mail exchange record that is required to configure email account with a domain. This record specifies the mail servers that are responsible for sending and accepting emails on behalf of a domain.
In order to point ranges of mail servers for load balancing, there can be multiple MX records in a DNS.
In a DNS zone, a TXT record stands for text record that is arbitrary text associated with a host or other names. TXT records generally comprise human-readable information about a server, data center, or network. It is normally used to verify the ownership of a domain for different purposes. It is also used to record a few machine-readable information into the DNS.
The TXT records can help you in third party services integration to your domain. All these records fall under secondary records in a DNS zone. In no case, a TXT record can affect basic domain configuration. Those are just additional records that you need tp put in your DNS zone for various purposes. The following are examples of TXT records.
I believe that you are now fully familiar with the terms associated with a domain name system. You can understand the meaning of the most essential DNS records as well as you can specify their functions in relation to a domain, server, website, and third party services. However, you need to know where to and how to configure these records so that you can seamlessly manage your domain, hosting, and associated requirements. Just visit the second part of this guide.