Guides RECORDS
DNS record types
Your host gives you your website’s address. Which domain setting do you enter it in?
Your host has prepared the website for example.com and given you its web server’s address. You now need to set your domain so visitors receive that address. You do this with a DNS record: one setting associating a name with a value.
First: set your website’s address
For this example, your host supplies 192.0.2.44 for the website at example.com. This is an IPv4 address. The setting associating a name with this kind of address is called an A record. For your own website, always use the address from your host. The value above is an example.
In your DNS panel, enter:
- Name or Host: example.com. Many panels use
@or a blank field for this. Follow your provider’s instructions. - Type:
A. - Value or Address:
192.0.2.44. - TTL: for example,
3600seconds. This controls how long a DNS service may remember the answer.
An abbreviated record line would be example.com. A 192.0.2.44. Panels usually have separate fields for the name, type and value. After saving, check the answer for example.com and open the website. An address in DNS does not prove that the web server works. When changing an address, also allow for old answers. The DNS guide explains that waiting period.
A and AAAA: IP addresses
An A record links a name to an IPv4 address. An AAAA record links a name to an IPv6 address. Both types can publish a web server’s address, for example.
Examples: example.com. A 192.0.2.44 and example.com. AAAA 2001:db8::44. Publishing both lets clients find both address types. It does not prove that the site works over both. Before adding AAAA, check that the server, network route and HTTPS settings work over IPv6 too. A wrong IPv6 address can affect some visitors even when IPv4 works.
Next: entering names correctly
For the website above, we used example.com itself. A panel can also append that domain to a short name: www becomes www.example.com. Check the full saved name to avoid accidentally creating www.example.com.example.com.
A final dot in a zone file indicates a complete name. Whether to enter that dot in a panel depends on the provider. Some record types use another name as a target. Such a target is not a website URL: do not add https://, a port or a path.
MX: where your mail goes
An MX record (Mail eXchange) tells sending mail servers which server the mail for your domain should go to. You can have several, each with a priority number: a lower number takes precedence.
Example: example.com MX 10 mail.example.com. Does your domain receive no mail at all? Then you can set a 'null MX' (example.com MX 0 .) to explicitly say: no mail is received here. If it sends nothing either, add v=spf1 -all alongside it (see the SPF guide).
When using a mail provider, copy the MX targets it specifies. A target is a hostname with direct A and/or AAAA address records, not an IP address or a CNAME. For your own mail server, you might need both example.com. MX 10 mail.example.com. and mail.example.com. A 192.0.2.25, plus a working service that accepts mail. An MX record does not create a mailbox. SPF, DKIM and DMARC also matter for outgoing mail. Each has its own guide.
TXT: free text (and your mail security)
A TXT record holds text for a particular application, such as ownership verification, SPF, DKIM or DMARC. Several TXT records at one name are often perfectly valid. A verification code can sit alongside an SPF record at example.com, for example. Do not join those texts together.
Each application has its own rules. If you publish SPF, that name should have one SPF record. DMARC also needs a single selectable policy record, and a DKIM selector should not have several separate key records. Do not add another policy record just because you use another service.
Common names are:
- SPF: use the name of your sending service’s MAIL FROM or return-path domain. This may be
example.com(often entered as@), a subdomain or a domain owned by the provider. See the SPF guide before combining senders at one name. - DMARC:
_dmarc.example.com, often entered as_dmarc. - DKIM: for example,
s1._domainkey.example.com. The mail provider supplies the selector and value.
Some providers use a CNAME for DKIM instead of a TXT record. Follow their exact instructions. The SPF, DKIM and DMARC guides explain the content and selection of these records in more detail.
CNAME: an alias to another name
A CNAME (Canonical Name) makes one name an alias of another DNS name. For example: www.example.com. CNAME example.com.. This can be useful for www or a subdomain pointing to a provider’s service. The target can ultimately lead to an address through A, AAAA or both.
A name with a CNAME cannot hold other ordinary records, including A, MX or TXT at that same name. The main domain, also called the zone apex, needs NS and SOA records, so an ordinary CNAME cannot go there. Use A/AAAA or follow your provider’s other supported solution.
A CNAME does not change the URL in the browser. In this example, the visitor still visits www.example.com. Your host must therefore serve that name and have a suitable TLS certificate for it. To send visitors to a different URL, configure a redirect at your host or web server.
NS: who's in charge of your zone
NS (Name Server) records identify the nameservers that give the official answers for your zone. For a registered domain, they appear both in your own zone and in the parent zone operated by the TLD registry, such as .com. Your registrar handles changes to that parent zone. The sets should agree.
Example: example.com. NS ns1.example.net.. When moving DNS for the whole domain, change the nameservers at your registrar after preparing the new zone. For a separately delegated subdomain, delegation belongs in its parent zone instead: the NS records for team.example.com are managed by the operator of example.com. The DNS guide gives the migration checks.
SOA: the 'cover page' of your zone
The SOA record (Start Of Authority) sits at the top of every zone and holds its administration: which nameserver is the primary source, a contact address, and a serial number that must go up with every change so other servers know something changed. You rarely create this record yourself. Your DNS provider manages it. Good to recognize, not something to tinker with.
Primary sources
Frequently asked questions
What's the difference between an A and a CNAME record?
An A record gives an IPv4 address. An AAAA record gives an IPv6 address. A CNAME points to another DNS name that can ultimately lead to address records. A CNAME is not a URL redirect. Do not use an ordinary CNAME at the zone apex. Use your provider’s A/AAAA or other supported solution there.
My website works but my mail doesn't (or vice versa). How come?
Website and mail use different records: A/AAAA for the website and MX for incoming mail. One can work while the other is missing or incorrect. Check the record type for the service that has the problem.
What is an SRV or CAA record?
Those are less common types. SRV points to a service on a specific port (e.g. for chat or telephony). CAA declares which certificate authority (CA) may issue a TLS certificate for your domain. There's a separate guide on that.
Can I have multiple records of the same type?
Often yes: several A or AAAA records for addresses, MX records for mail servers and TXT records for different applications. An application may restrict that: do not publish two SPF records at one name or two DMARC policy records at _dmarc, for example. A CNAME cannot coexist with ordinary other records at the same name.
What does the number on an MX record mean?
That's the priority: a lower number takes precedence. 10 mail1 and 20 mail2 means: try mail1 first, and only if it's unreachable use mail2.