Bite Sized Tech is a participant in Unity Affiliate Program, Liquid Web Affiliate Program, Hostinger Affiliate Program, Namecheap Affiliate Program, Envato Elements Affiliate Program, Adobe Affiliate Program and SteelSeries Affiliate Program under which we might earn commission when visitors use our Affiliate Links and makes qualifying purchases.


DNS Records | A, AAAA, CNAME, MX, TXT, NS, SOA, SRV, PTR & CAA | Web Development Tutorial


DNS Records are a basic yet extremely important part of administering Websites & Web applications

which if not done correctly can lead to annoying problems like the Website or Service not being available

or emails not being sent and received from the connected domain.

In this Article, we will be talking about and overviewing

  • What are DNS Records?
  • And Various Types of DNS Records like – A, AAAA, CNAME, MX, TXT, NS, SOA, SRV, PTR & CAA

to get a better understanding of what are the uses of these DNS records.

So, without further ado, let’s get started!


This Article is part of 3 part article series on DNS (Domain Name System)

IP Address and DNS (Domain Name System)
DNS Zones and DNS Zone Files
DNS Records and Types of DNS Records <— You’re Currently Here 😛


DNS Records and Types of DNS Records - A, AAAA, CNAME, MX, TXT, NS, SOA, SRV, PTR & CAA - Featured Image


What are DNS Records?

DNS Records are used to provide information about the domain and how requests to the domain should be handled.

These records are written in a special format called DNS Syntax in what we call DNS Zone Files

and are stored in Authoritative DNS Nameservers which are contacted during the DNS Lookup process.

There are a lot of these types of DNS Records like

  • A Records
  • AAAA Records
  • CNAME Records
  • MX Records
  • TXT Records
  • NS Records
  • SOA Records
  • SRV Records
  • PTR Records
  • CAA Records

and many other DNS Records which are not used as frequently as those listed above.

So let’s go over all these Frequently used DNS Records to understand each of their uses.


Types of DNS Records

DNS – A Records

A Record can be used by website administrators to point a hostname or domain to an IPv4 Address.

For Example, if a DNS Query for ‘dns.google‘ is made

then it will resolve to IPv4 Address of – 8.8.8.8 or 8.8.4.4

Each Domain Name can only have a single A Record.

While adding an A Record, you will need to

Set Record Type to – A
Set Hostname Label / Name to – ‘@’ for your Root Domain or ‘subdomain.exampledomain.tld’ if setting A Record for a Sub Domain.
Set Record Data / Content / Target to – The IPv4 Address you want to point the domain towards
Set TTL to – Auto or whatever the default is or 14400 i.e. 4 hours


DNS – AAAA Records

AAAA Record can be used by website administrators to point a hostname or domain to an IPv6 Address.

For Example, if a DNS Query for ‘dns.google‘ is made

then it will resolve to IPv6 Address of – 2001:4860:4860::8888 or 2001:4860:4860::8844

Each Domain Name can only have a single AAAA Record.

While adding an AAAA Record, you will need to

  • Set Record Type to – AAAA
  • Set Hostname Label / Name to – ‘@’ for your Root Domain or ‘subdomain.exampledomain.tld’ if setting AAAA Record for a Sub Domain.
  • Set Record Data / Content / Target to – The IPv6 Address you want to point the domain towards
  • Set TTL to – Auto or whatever the default is or 14400 i.e. 4 hours

DNS – CNAME Records

CNAME Record which is an abbreviation of Canonical Name Record can be used to set one domain as an alias of another domain.

For Example, let’s say

  • Domain 1 – exampledomain.com
  • Domain 2 – blog.exampledomain.com

then you can create a CNAME Record to make it so that

if someone goes to ‘blog.exampledomain.com‘ then will be redirected to ‘exampledomain.com

You can also do the opposite where

all traffic coming to ‘exampledomain.com‘ will be redirected to ‘exampledomain.com

While adding a CNAME Record, you will need to

  • Set Record Type to – CNAME
  • Set Hostname Label / Name to – Name of the Alias Domain like ‘blog’ or Subdomain like ‘blog.exampledomain.com’
  • Set Record Data / Content / Target to – Name of Domain which the Alias Domain Points to like ‘exampledomain.com’
  • Set TTL to – Auto or whatever the default is or 14400 i.e. 4 hours

DNS – MX Records

MX Record is an abbreviation of Mail Exchanger Record

and can be used to specify the Mail Server which will process the incoming emails

to the domain name that you are setting the MX Record on.

For Example, if you have a domain ‘exampledomain.com

then to receive emails to you custom shiny ‘[email protected]‘ or ‘[email protected]

you will need to set MX Records.

Be mindful that MX Records only deal with incoming emails and have nothing to do with outgoing emails.

Different from A or AAAA Records, usually you will add 2 MX Records having different Mail Servers.

In case of Hostinger, the default MX Records are

  • mx1.hostinger.com
  • mx2.hostinger.com

and it will be different for each provider.

If you are using a Third-Party Email Provider, then you will need to modify the MX Record

and change it to the Mail Servers of that Third-Party Email Provider.

While adding a MX Record, you will need to

  • Set Record Type to – MX
  • Set Hostname Label / Name to – ‘@’
  • Set Record Data / Content / Target to – Mail Server of your Email Provider
  • Set Priority to – a Number to sort between multiple MX Records. Lower the Number, Higher the Priority.
  • Set TTL to – Auto or whatever the default is or 3600 i.e. 1 hours

DNS – TXT Records

TXT Records are used by website administrators to convey important information about the domain

and can be used for many varied purposes like

  • Defining who is authorized to send emails on behalf of the domain in question with an SPF Record (SPF – Sender Policy Framework)
  • For Verifying Domain Ownership when working with Google Search Console, Bing Webmaster, Pinterest, etc
  • and more like DKIM Record and DMARC Record to fight against email spam.

While adding a TXT Record, you will need to

  • Set Record Type to – TXT
  • Set Hostname Label / Name to – ‘@’
  • Set Record Data / Content to – Whatever the content is based on the instructions for different TXT Records.
  • Set Priority to – a Number to sort between multiple MX Records. Lower the Number, Higher the Priority.
  • Set TTL to – Auto or whatever the default is or 14400 i.e. 4 hours

DNS – NS Records

NS Record is an abbreviation for Name Server Record

and is used to define the Authoritative DNS Name Server for the domain in question.

So, NS Record define where to find the IP Address of the domain when Domain Name is being resolved.

If NS Record is not defined correctly, no one will be able to visit the Website or Web Applications on the said domain.

A Domain usually has 2 NS Records which define, Primary and Secondary Name Server for that domain respectively.

While adding NS Record, you will need to

  • Set Record Type to – NS
  • Set Hostname Label / Name to – ‘@’
  • Set Record Data / Content / Target to – Address of Name Servers. Eg (Hostinger) – ns1.dns-parking.com & ns2.dns-parking.com
  • Set Priority to – Default or 0
  • Set TTL to – Auto or whatever the default is or 86400 i.e. 24 hours

DNS – SOA Records

SOA Record is an abbreviation of Start Of Authority Record

and it contains important information regarding the Domain and DNS Zone like

  • NAME – Name of the zone
  • RECORD TYPE – SOA
  • CLASS – Zone Class – IN (Internet), CH(Chaosnet) or HS (Hesiod) but usually it IN.
  • TTL – Time To Live
  • MNAME – Primary Name Server.
  • RNAME – Admin Email Address. Typed as adam.exampledomain.com instead of [email protected]
  • SERIAL – Version Number for the SOA record
  • REFRESH – Time Interval in Seconds Before Secondary Server Gets and Refreshes SOA Record from Primary Server.
  • RETRY – Time Interval in Seconds Before Secondary Server Retries if Primary Server was Non Responsive.
  • EXPIRE – If Primary Server Doesn’t Respond within this timeframe (in seconds) then stop responding to queries for the DNS Zone.
  • MINIMUM – Time to Live for Negative Caching.

DNS – SRV Records

SRV Record is an abbreviation for Service Record and can be used to define Services like

  • VoIP – Voice over IP
  • Instant Messaging
  • and many more.

by specifying Hostname & Port Number of a such Services using the SRV Record.

Adding SRV Records will guide applications to find your preferences for defined services.

While adding a SRV Record, you will need to

  • Set Record Type to – SRV
  • Set Hostname Label / Name to – will follow ‘_service._protocol.exampledomain.com‘ convention. Ex. – _xmpp-client._tcp.exampledomain.com
  • Set Weight to – If multiple SRV Record have same Priority then Weight will help decide which Service goes first. Higher the Number, Higher the Priority.
  • Set Port Number to – The Port Number on which the service is running.
  • Set Record Data / Content / Target to – Address of the Server on which the service is running.
  • Set Priority to – a Number to sort between multiple SRV Records. Lower the Number, Higher the Priority.
  • Set TTL to – Auto or whatever the default is or 86400 i.e. 24 hours

DNS – PTR Records

PTR Record is an abbreviation of Pointer Record and is literally the opposite of A or AAAA Records.

While A or AAAA Records are used for DNS Lookups to convert Domain Name into IPv4 or IPv6 Address,

PTR Records are used for Reverse DNS Lookups to convert IPv4 or IPv6 Address into Domain Name.

For Example, if a Reverse DNS Lookup for IPv4 Address ‘8.8.8.8’ or ‘8.8.4.4’

or IPv6 Address ‘2001:4860:4860::8888’ or ‘2001:4860:4860::8844’ is done

then it will resolve to Domain Name of – dns.google

You can try doing it at MXToolbox.


DNS – CAA Records

CAA Record is an abbreviation for Certification Authority Authorization

and is used to define the various Certificate Authorities (CA) that can issue SSL Certificates for the domain in question.

While adding a CAA Record, you will need to

  • Set Record Type to – CAA
  • Set Hostname Label / Name to – ‘@’
  • Set Record Data / Content / Target to – Will Follow ‘FLAG TAG CA-Domain‘ convention
    • FLAG – Between 0 and 255. Default is 0
    • TAG – issue, issuewild, and iodef.
      • issue – will allow a single Certificate Authority to grant any type of certificate.
      • issuewild – will allow the Certificate Authority to only use a wildcard certificate.
      • iodef – is to specify the contact info the Certificate Authority can report to if there are any CAA-related issues.
    • CA-Domain – Domain Name of the Certificate Authority.
  • Set Priority to – Default or 0
  • Set TTL to – Auto or whatever the default is or 86400 i.e. 24 hours

This Article is part of 3 part article series on DNS (Domain Name System)

IP Address and DNS (Domain Name System)
DNS Zones and DNS Zone Files
DNS Records and Types of DNS Records <— You’re Currently Here 😛


Conclusion

Well Folks! That does it for this article on DNS Records and I hope you found this information helpful.

May you have success in your career whatever it may be and see you again in the upcoming articles.

Share this post on Social Media platforms, if you think our content is great.

If you like the content and would like to follow us, we are present on the platforms below

Follow Us On Social Media

Goodbye For Now,
This is your host VP
Signing Off.



Articles In Monetizing Websites Series


Ways To Monetize Your Blog

Understanding Audience Intent Of Your Blog Traffic

Building a Monetization Strategy (Not Uploaded)

Digital Marketing Revenue Models – CPM, CPC, CPA, CPL & CPI

Affiliate Marketing & Monetizing Your Blog Using It. (Not Uploaded)

How is your Ad Inventory Auctioned (Not Uploaded)

Affiliate Marketing and Why it Works. (Not Uploaded)