A Records (Address Records) are the fundamental type of DNS record used to associate a domain name with an IP address. They are used to translate a domain name to an IP address, enabling users to access a website using the domain name instead of its IP address. When someone types in a domain name in their browser, the A Record associated with that domain name points the browser to the IP address of the server where the website is hosted.
A records for websites
Let's say you own a website "www.example.com". You want users to be able to access your website by simply typing "www.example.com" in their browser. To do this, you would create an A Record that maps the domain name "www.example.com" to the IP address of the server where your website is hosted, say "192.0.2.1". When someone types "www.example.com" in their browser, the DNS system will look up the corresponding A Record and translate it to the IP address "192.0.2.1". The browser will then connect to the server at that IP address and load the website.
A records for email
A Records can also be used for email services. To ensure that emails sent to "firstname.lastname@example.org" or "email@example.com" reach the correct mail server, you would create A Records for mail server hostnames, such as "mail.example.com", that map to the IP addresses of your mail servers.
In addition to A Records, other types of DNS records are typically used for email services, such as MX (Mail Exchange) records, which specify the mail servers responsible for accepting email messages for a domain, and SPF (Sender Policy Framework) records, which help protect against email spoofing.