Skip to main content

Command Palette

Search for a command to run...

Domain Name Server Records

Updated
4 min readView as Markdown

Domain name Server is the backbone of Internet. If you think of the internet as a magician, DNS is the parrot.

It drives everything behind the scenes and responsible for making sure that if you type google.com you reach it, though there are components specific to your network as well. Let’s discuss them in some other blog.

You must have heard about IP address. That’s what we know resolved by and is given by DNS to us when we type a domain in our browser’s address bar. But wait, are you aware of any other records that DNS uses to find the other services associated.

Yes, there are other DNS records as well, for functionalities other than finding the IP addresses. Let’s see the DNS record types:

TXT - this record is used to verify that you own the domain. The verification is conducted by any of the services that you may opt for, and the service needs your domain name. Like office 365, SPF and DKIM.

CNAME - Canonical Name is a record which acts as an alias for a domain. It is created in when the domain names distributed or in use may change frequently or are subjected to change. Then they are pointed to one CNAME record and in case of any change of the domains pointing to this CNAME record are changed, rather going through the amending the individual domain records we can only change the domain name pointing to CNAME record. e.g. if a CNAME record is created for blog.chaicode.com pointing to chaicode.com and later the former changes to kb.chaicode.com the only change we need to make in the CANME record and not for all the DOMAIN records of kb.chaicode.com. This record can be treated as the namespace as well, where multiple domains are pointing to single domain.

MX - This DNS records represents a mail server and is used to delivering the emails. This represents the receiving server. These records have the priority in which the mail servers will receive the emails. Lower the number higher the priority. SMTP and POP are the protocols used for sending and receiving the email. Sender → MX lookup → mail.example.com:25 (SMTP delivery) ↓ Mail stored User POP3 client → mail.example.com:995 (retrieve mail) User SMTP client → mail.example.com:587 (send replies). POP3 does not use MX records as it directly connects with exchange server over TCP for retrieving and sending replies to email. IMAP is another protocol used to retrieve emails as POP3. However, POP3 downloads the emails to local and one device, whereas IMAP download only headers and sync the emails to other devices as well which connecting to exchange server.

A & AAAA: This record is saved to redirect the domain names to their respective IP4 address and IP6 address respectively.

NS: This record represents the Authoritative server where the domain is actually hosted. We can host / buy the domain from any of the popular domain providers / domain hosts like godaddy, namecheap, hostinger etc. but can change their authoritative server for more services without changing the domain registration. These security features may include prevention of DDoS attacks, prevention of spoofing, reduced lookup latency etc.

Considering you have changed your name server to Microsoft, and your exchange service sits on MS. Then you can create a TXT record for protocol names SPF (sender policy framework). When the email is sent from your domain, receiver checks the IP address of the server matches to the one defined in SPF.

Similarly, use of DKIM (domain key identified mail) can also be used to after being introduced as a TXT record. Once in place signs the email with private key resulting encryption and which is decrypted at recipient end using public key and matched. If the key values match the email is ok.

SRV: this record points to a particular server for a particular service like VoIP, chats, online gaming. This record has parts service_name + protocol + domain name + priority + weight + port + target.

  • Service name = > Name of the service e.g. SIP for chatting

  • Protocol = > protocol that the service uses

  • Domain Name [this constitutes the 1st part]

  • TTL => time to live

  • Priority => Priority of the server to which the request should land. Lower the number higher the priority.

  • weight => to share the traffic if 2 servers have same priority

  • port => port at which the service is running

  • target => FQDN of the server.

sip-client.tcp.example.com. 3600 SRV 10 5 5222 chat.example.com.