Menu

Search tools and guides

DMARC & DKIMCheck DMARC and DKIM, generate records and keys
SPF Record CheckerValidate SPF and count lookups against the limit of 10
DNS Blacklist CheckerCheck IPs and mail servers against spam blocklists
Email Header AnalyserTrace hops, delays and SPF/DKIM/DMARC in raw headers
Email ValidatorSyntax, MX, SPF and DMARC verification
DNS LookupQuery A, AAAA, MX, TXT, NS and more
WHOIS LookupRegistration data over RDAP
Website StatusAvailability and response-time checks
Ports ReferenceWhat runs on each TCP and UDP port, and if it's safe
MAC Address LookupFind a MAC address vendor and check if it's random
Download Time CalculatorHow long a file takes at your broadband speed
QR Code GeneratorQR codes for Wi-Fi, links and text, as PNG or SVG
User Agent ParserWhat your browser says about itself, decoded
IP ConverterDecimal, hex, binary and IPv6 conversion
Subnet CalculatorCIDR ranges, masks and subnet splitting
CIDR AggregatorMerge IPs and ranges into the fewest CIDR blocks
SSL CheckerInspect certificates, chains and expiry
HTTP HeadersAudit security headers and redirect chains
Password GeneratorCryptographically secure random passwords
Hash GeneratorMD5, SHA-1, SHA-256, SHA-384 and SHA-512
JWT DecoderDecode JWT claims and verify HS256, RS256, ES256
Unix Timestamp ConverterConvert epoch seconds or ms to UTC and UK time
UUID GeneratorGenerate UUID v4, v7 and ULIDs; decode any UUID
Cron Expression ExplainerCron schedules in plain English, with next runs
Regex TesterTest JavaScript regex with live match highlighting
Chmod CalculatorUnix permissions as octal, symbols and commands
Colour Contrast CheckerWCAG contrast ratio for text and background colours
JSON FormatterPretty-print, minify and validate JSON
Base64 EncoderConvert to and from Base64, Unicode safe
URL EncoderPercent-encode and decode URL strings
HTML EntitiesEscape and unescape HTML special characters
Text Diff CheckerCompare two texts line by line, word by word
Word & Character CounterWords, characters, reading time and SMS segments
Case ConverterUPPER, lower, Title Case, camelCase and more
URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs
DNS records explained: A, AAAA, CNAME, MX, TXT, NS and the restWhat each common DNS record type does, the rules that trip people up – CNAMEs at the root, MX pointing at an IP – and how TTL and caching really work.
Mbps and MB/s: why downloads look slower than your broadband speedWhy a 100 Mbps line downloads at 12 MB/s, why a 1 TB drive shows 931 GB, what slows real transfers, and what a UK advertised average speed promises.
Setting up SPF, DKIM and DMARC for Microsoft 365Step by step for a domain on Microsoft 365, from the first SPF record to a DMARC policy of reject, avoiding the mistakes that cause bounces.
SPF "too many DNS lookups": why it happens and how to fix itWhat the ten-lookup limit in RFC 7208 counts, how to tally your own record, and the fixes that work without silently breaking mail.
How to read a DMARC aggregate reportA field-by-field tour of the XML that receivers send to your rua= address, and how to turn it into a list of senders to fix before you enforce.
What your IP address reveals – and what it does notHow IP geolocation really works, why it often puts you in the wrong town, what a website can and cannot learn from your address, and how UK law treats it.
Diagnosing a website that will not load: DNS, TLS and HTTP in orderA methodical checklist for working out whether an outage is DNS, the certificate, the server or just you – and what each kind of failure looks like.

Arrow keys move through results, Enter opens one, Escape closes.

DNS records explained: A, AAAA, CNAME, MX, TXT, NS and the rest

What each common DNS record type does, the rules that trip people up – CNAMEs at the root, MX pointing at an IP – and how TTL and caching really work.

By BD Digital Creations. Published , 7 minute read.

In short

DNS records hold the addresses and settings for a domain: A and AAAA map a name to IPv4 and IPv6 addresses, CNAME aliases one name to another, MX names the mail servers, TXT carries SPF, DKIM and DMARC, and NS lists the nameservers. Changes appear as caches expire, which each record's TTL controls; nothing is pushed out.

On this page

DNS is the internet's directory: it turns a name such as example.co.uk into the addresses and settings that computers need. Almost every problem with a website or email – "the site has gone", "mail is bouncing", "Google cannot verify the domain" – ends up as a question about one DNS record. Knowing what each record type does, and the handful of rules that catch people out, makes those problems much quicker to solve.

You can look up any record described here with our DNS Lookup tool, which queries Cloudflare's or Google's public resolvers so you see what the rest of the world sees, not what your own computer has cached.

Where your records live

#

Every domain has a set of authoritative nameservers holding its records, called its zone. The registrar where you bought the domain records which nameservers those are. The two are often the same company but do not have to be: a domain registered with one firm can have its DNS hosted by another, such as Cloudflare or your web host.

This is the first thing to establish when a change "is not working": are you editing records at the company that actually answers for the domain? Our WHOIS Lookup shows the nameservers the registry has on file, and a DNS lookup of the domain's NS records confirms what is answering. Records added at any other provider are simply never seen.

The common record types

#
TypeWhat it holdsTypical use
AAn IPv4 addressPoints a name at a web server
AAAAAn IPv6 addressThe IPv6 equivalent of A
CNAMEAnother name (an alias)Points www or a service subdomain at a provider
MXA mail server name and a prioritySays where email for the domain is delivered
TXTFree textSPF, DMARC, DKIM keys and ownership verification
NSNameserver namesDelegates a domain or subdomain to its DNS host
SOAZone administration dataSerial number and caching timers for the zone
CAACertificate authority namesRestricts which authorities may issue SSL certificates
SRVHost, port, priority and weightLocates services such as SIP or some chat systems
PTRA name, for an IP addressReverse DNS, used heavily in email filtering

A and AAAA: names to addresses

#

An A record maps a name to an IPv4 address; AAAA (pronounced "quad-A") does the same for IPv6. A name can have several of each, and resolvers return them all; clients pick one, which spreads load and provides a fallback.

If you publish an AAAA record, it must work. Visitors whose connection has IPv6 will usually try it first, and if the server does not answer on IPv6 they can see a slow page or a failure while everyone else is fine – an outage that is very hard to reproduce. When moving hosts, remember to update or remove the AAAA record as well as the A record.

CNAME: an alias, with strict rules

#

A CNAME says "this name is another name; look that up instead". It is how you point www.example.co.uk at a hosting platform, or shop.example.co.uk at an e-commerce provider, without copying their IP addresses into your zone.

The specification gives CNAMEs a rule that causes more confusion than anything else in DNS: a name with a CNAME may have no other records. That has two consequences:

  • You cannot put a CNAME at the root of your domain (example.co.uk itself), because the root must also hold your NS and SOA records, and usually holds MX and TXT records too. Many DNS providers offer a workaround called ALIAS, ANAME or "CNAME flattening", which looks up the target and publishes its addresses as ordinary A records.
  • You cannot add a TXT record to a name that is a CNAME. If a verification service asks for a TXT record on shop.example.co.uk and that name is already a CNAME, the TXT record will be ignored or rejected.

MX: where email goes

#

An MX record names a server that accepts email for the domain, with a priority number. Lower numbers are tried first; servers with higher numbers are backups. Two rules matter:

  • An MX record must point at a name, not an IP address. 10 203.0.113.5 is invalid; create an A record such as mail.example.co.uk and point the MX at that.
  • The name it points at should not be a CNAME. The standards forbid it, and while some senders cope, others do not.

MX records only control incoming mail. Whether your outgoing mail is trusted is decided by SPF, DKIM and DMARC, which are TXT records – see our guide to setting them up for Microsoft 365. Our Email Validator shows the MX records for any address's domain.

TXT: the record that does everything else

#

A TXT record holds text, and services have adopted it for almost every kind of configuration: SPF (v=spf1 …) at the root, DMARC at _dmarc, DKIM public keys at selector._domainkey, and the verification codes that Google, Microsoft and others ask you to publish to prove you own a domain.

Each string inside a TXT record is limited to 255 characters. Longer values – a 2048-bit DKIM key, for instance – are split into several quoted strings within the same record, which receivers join back together. Most DNS control panels do this for you; a few need it entered by hand. A domain can have many TXT records, but must have only one SPF record.

NS and SOA: how the zone is run

#

NS records list a zone's nameservers. At the root they should match what the registrar has on file; on a subdomain they delegate that subdomain to a different DNS host entirely, which is how a provider can manage mail.example.co.uk while you keep the rest.

The SOA (start of authority) record holds administrative values for the zone. The one worth knowing is the last field, which sets how long resolvers may cache a "this name does not exist" answer (or the SOA record's own TTL, if that is shorter). If you look up a name before creating it, that negative answer can stick for the length of this timer, which is why a newly added record sometimes seems not to appear.

CAA: who may issue your certificates

#

A CAA record lists the certificate authorities allowed to issue SSL certificates for your domain, for example 0 issue "letsencrypt.org". Authorities are required to check it before issuing. It is a sensible protection, but it can also break automatic renewal if your host switches to an authority your record does not list. If certificate renewal suddenly fails, check for a CAA record.

SRV and PTR

#

SRV records advertise where a particular service runs, using names such as _sip._tls.example.co.uk, with a host, port, priority and weight. You will usually only meet them when a phone system or collaboration tool asks you to add one.

PTR records do the reverse of A records: they map an IP address back to a name. They are not in your domain's zone at all; they are controlled by whoever holds the IP address – your hosting company or internet provider. Mail servers check them, and a sending server with no reverse DNS, or one that does not match its forward record, is treated with suspicion. Our DNS Lookup tool does PTR lookups if you enter an IP address.

TTL and the myth of "propagation"

#

Every record has a TTL (time to live), in seconds, telling resolvers how long they may cache it. A TTL of 3600 means a resolver that looked the record up a minute ago may keep using the old answer for another 59 minutes.

That is all "DNS propagation" really is: caches expiring at different times around the world. Nothing is being pushed out. It has two practical consequences:

  • Before a planned change, lower the TTL – to 300 seconds, say – a day in advance. When you make the change, caches catch up within minutes. Raise it again afterwards.
  • When a change seems not to work, check from outside. Your own computer and router cache too. A lookup through a public resolver, as our tool does, shows what a new visitor would see.

A quick troubleshooting order

#
  1. Confirm which nameservers the domain is delegated to, and that you are editing records there.
  2. Look up the exact name and type through a public resolver.
  3. Check for duplicate or conflicting records – two SPF records, a CNAME alongside other records, an old AAAA record.
  4. Check the TTL to know how long caches may hold the old value.
  5. If the name returns "does not exist" right after you created it, wait for the negative-caching time in the SOA record.

If the problem is a website that will not load at all, our guide to diagnosing a website that is down puts DNS in context with the other layers to check.

Spotted a mistake, or something out of date? Email hello@bddc.co.uk and we will correct it. How we research and maintain these guides is set out in our editorial policy.

Accessibility

Adjust how the site looks and behaves. Your choices are saved in this browser only.

Colour theme
Text size
Accessibility statement