- It is the Address records also known as host records
- Points to the IP address reflecting the domain
- Used for forward lookup of any domain name
Our website is configured on 220.127.116.11 IP so the A record of my domain name will point towards that IP.
Every time a query for golinuxhub.com is made the internet will lookup for contents stored on the machine with 18.104.22.168 this IP.
Can I use multiple A records for a single domain?
Yes, there can be multiple A records for a single domain but only that is not going to help you with failover in case you are planning for one. Using multiple A records for a single domain will help you create a round robin configuration.
For example you have used two IPs 192.168.0.1 and 192.168.0.2 for same domain name example.com so when a user hits the lookup query for example.com, the query would land on your nameservers. Now there the query can pick any of the A record entry and will load the page. So, basically the back end user does not gets to know the server from which the website was picked and loaded. There might be a possibility that simultaneously if another request is made for the same domain, another A record might be picked up for different user.
- It is short abbreviation for Canonical Name
- Provides an alias name for same hostname
- Helps create subdomains
NOTE: You can not create a CNAME record for the domain name itself (it should be done with A record)
golinuxhub.com is a domain name whereas www.golinuxhub.com is a sub domain name
Example using A records and CNAME records
IN NS example.com.
example.com. IN A 192.168.0.100
www.example.com IN CNAME example.com.
ftp.example.com IN CNAME example.com.
test.example.com IN CNAME example.com.
In the above example I have defined the nameserver for my machine and the A record determines the IP address pointing to the name server
Also I have used CNAME record to use multiple sub domain names for the same nameserver i.e. www, ftp, test etc
How does a DNS query works when you type a URL on your browser?
DNS server related errors
Configure your BIND DNS server on different port no.
How to configure BIND-9.2 DNS server in Red Hat Linux
How to configure BIND-9.8 DNS server in Red Hat Linux 6
How to configure a caching only bind DNS server in Red Hat Linux