DNS (Domain Name System) is an Internet system that converts human-memorable domain names (like example.com) into computer-readable addresses (like 220.127.116.11). DNS uses zone files in your server to map domain names to IP addresses. The DNS records accessible through your HostPapa dashboard are A, CNAME, MX, and TXT. In this article, we’ll explain the difference between each of these four records.
Note: To edit records in your DNS zone at the registrar, you need to point your DNS to the registrar’s nameservers.
The A in “A record” stands for “Address.” An A record maps a domain to the physical IP address of the computer hosting that domain. Internet traffic uses the A record to find the computer hosting your domain’s DNS settings. The value of an A record is always an IP address, and you can configure multiple A records for one domain name.
A records allow DNS servers to identify and locate your website and its various services on the Internet. This enables users to type in a human-readable domain while the computer continues to work with numbers. For example, you may have followed a link from another website pointing to example.com to get to a web page. In the DNS Zone Editor, the A record that points to example.com is an IP address. 18.104.22.168.
Without appropriate A records, visitors wouldn’t be able to access your website, and FTP and email accounts would not function.
A CNAME record is an abbreviation for Canonical Name record. It is a type of resource record in the DNS used to specify that a domain name is an alias for another domain, the “canonical” domain. A CNAME points one domain or subdomain to another domain name, allowing you to update one A Record each time you make a change, regardless of how many Host Records need to resolve to that IP address.
All information, including subdomains, IP addresses, etc., are defined by the canonical domain. CNAME records allow an administrator to point multiple systems to one IP without specifically assigning an A record to each hostname. If your server IP ever changes, you only have to change one A record’s IP address to update all associated records.
A mail exchanger record (MX record) defines how emails will be routed for your domain and sets a preference value to prioritize mail delivery if multiple mail servers are available. You can have many MX records for a domain. The mail server will attempt to contact them in numeric order, starting at the lowest number. This lets you set up multiple values if you need more than one nameserver.
If you have two records with the same value, the record used will be chosen at random. If a lower-valued record isn’t available, the next highest value will be used. Often, higher values are configured to only save the messages and then forward them on to the lower values when they become available again.
Note: HostPapa’s hosting services use only a single MX record.
The MX records of a domain name specify how email should be routed with the Simple Mail Transfer Protocol (SMTP). Like a CNAME, MX Entries must point to a domain and directly to an IP address.
Sender Policy Framework (SPF) is a relatively new protocol used for fighting spam. SPF uses a TXT record in a file located in a domain’s DNS zone to specify a list of authorized host names or IP addresses from which emails can originate. Once configured, email servers can verify SPF records that incorporate SPF verification in their anti-spam measures.
A Service record (SRV record) is a data specification in DNS that defines the location, such as the hostname and port number, of specified service servers.
A TXT record is a type of DNS record that provides text information to sources outside your domain. A fully qualified domain name may have many TXT records. TXT records commonly contain human-readable details on a server, network, data center, and other accounting information. Some uses for TXT records are Sender Policy Framework (SPF), DomainKeys (DK), and DomainKeys Identified E-mail (DKIM).
You could set up a TXT record on example.com that contains the IP address of your computer at home. This would mean that mail claiming to be from email@example.com is only allowed to be sent from your home IP.
For more information about DNS and domains, check out these HostPapa resources:
- How to use the DNS Zone Editor Knowledge Base article
- How to re-point your domain name Knowledge Base article
- HostPapa domain video tutorials
If you need help with your HostPapa account, please open a support ticket from your dashboard.