Bridge CDN
On this page

What are DNS records made of?

Every DNS record, whatever its type, has the same five parts. RFC 1035 calls each one a resource record, and the zone-file format writes them on one line:

www.example.com.   60   IN   A   203.0.113.10
Part In the example What it does
Owner name www.example.com. The name the record answers for
TTL 60 How many seconds resolvers may cache the answer
Class IN Internet. You'll never use anything else
Type A What kind of data follows
Data (RDATA) 203.0.113.10 The answer itself, formatted by type

Two details trip people up. First, the trailing dot. www.example.com. is a fully qualified domain name (FQDN). Without the dot, zone-file software appends the zone name, and you get www.example.com.example.com. Second, the owner name @ is shorthand for the zone apex, the bare domain itself.

In the Bridge zone editor you don't type this line. You fill in name, type, value and TTL as separate fields, and the editor builds a valid record from them.

How many types of DNS records are there?

IANA's registry lists dozens of DNS record types. Most of them are obsolete, experimental or used only inside DNS itself. A typical zone uses five to eight. Here are the ones that matter for running a domain, with the RFC that defines each and its numeric type code:

Type Code Defined in Holds Reference
A 1 RFC 1035 An IPv4 address IPv4 address records
AAAA 28 RFC 3596 An IPv6 address IPv6 address records
CNAME 5 RFC 1035 An alias pointing to another name Alias records and their limits
MX 15 RFC 1035 Mail servers, with priority Mail routing records
TXT 16 RFC 1035 Text: SPF, DKIM, DMARC, verification Text records and their syntax
NS 2 RFC 1035 Nameservers for a zone or subdomain Nameserver and delegation records
SOA 6 RFC 1035 Zone authority and timers Start of authority
CAA 257 RFC 8659 Certificate authorities allowed to issue Certificate issuance policy
SRV 33 RFC 2782 Host and port for a named service Service location records
HTTPS 65 RFC 9460 Connection hints for HTTPS clients HTTPS and SVCB records
SVCB 64 RFC 9460 Service binding for other protocols HTTPS and SVCB records
TLSA 52 RFC 6698 DANE certificate association TLSA records for DANE

DNSSEC adds its own types: DNSKEY, RRSIG, NSEC3 and DS. You don't create those by hand. They appear when a zone is signed, and the DS record goes to your registrar.

How records group into sets

A DNS zone isn't just a flat list. Records that share a name and a type form a record set, which RFC 2181 calls an RRset. Three A records on www are one RRset with three values. Resolvers always get the whole set back, never a single line from it.

That has practical consequences:

  • Multiple values are normal. Two MX records give mail a backup route. Several A records spread connections across servers, and clients pick among them.
  • One set, one TTL. RFC 2181 says every record in a set should carry the same TTL. If you set different values, resolvers may use the lowest one, so keep them equal.
  • Order isn't guaranteed. Resolvers can shuffle the values. If order matters, the record type has to say so, as MX priority and SRV priority and weight do.
  • TXT is the exception people forget. Several TXT values on one name are fine, but each is a separate string. SPF must live in exactly one of them.

When you edit a set in Bridge DNS, each value is its own row. Adding a second A record to www grows the set. It doesn't replace the first one.

DNS record types supported by Bridge DNS

Bridge DNS lets you create and edit 11 types: A, AAAA, CNAME, MX, TXT, NS, CAA, SRV, HTTPS, SVCB and TLSA. HTTPS, SVCB, TLSA and CAA are editable on every plan.

A few things work differently from a self-hosted zone:

  • SOA and apex NS are managed for you. We create and maintain them, and they don't appear as editable rows. You can still add NS records lower down to delegate a subdomain.
  • HTTPS and SVCB can be automatic. We can manage them for you, or you can write them by hand.
  • CAA records are manually editable.
  • DNSSEC records are generated. Turn on signing for the zone, and the keys and signatures are produced automatically.
  • A and AAAA records have a proxy switch. A proxied record answers with the Bridge edge instead of your origin IP.

Bridge DNS does not host PTR records for reverse DNS. The old SPF record type (99) is deprecated too. Publish SPF as a TXT record, as RFC 7208 requires.

Which DNS record should you use?

Pick the record by the job, not by habit:

You want to… Use
Point a name at an IPv4 server A
Point a name at an IPv6 server AAAA (usually next to an A)
Make www or a subdomain follow another hostname CNAME
Receive email at the domain MX, plus A/AAAA on the mail host
Publish SPF, DMARC or a verification string TXT
Publish a DKIM key TXT, or a CNAME if your mail provider hosts the key
Hand a subdomain to other nameservers NS
Limit which authorities may issue certificates CAA
Tell clients the host and port of a service like SIP SRV

The question we get most is A versus CNAME for the same name. The short version: use an A record when you know the IP, and a CNAME when someone else controls the IP and gives you a hostname.

Mail needs several records working together. Set up MX, SPF, DKIM and DMARC together using the email DNS steps.

Rules at the zone apex

The apex, example.com itself, follows stricter rules than any other name in the zone.

It always holds an SOA record and the NS record set. A CNAME can't share a name with any other record (RFC 1034, RFC 2181). So a CNAME at the apex is impossible, no matter how many tutorials suggest one. Use an A and AAAA record at the apex instead, or proxy the apex through Bridge so the edge handles it.

A, AAAA, MX, TXT, CAA and HTTPS records are all fine at the apex. That's where most domains keep their mail and verification records.

How to add DNS records in Bridge DNS

To add a record:

  1. Open your zone and choose Add record.
  2. Pick the type.
  3. Enter the name: @ for the apex, or a label like www, mail or _dmarc.
  4. Paste the value exactly as given. Hostnames go in CNAME, MX, NS and SRV values; IP addresses go only in A and AAAA.
  5. Keep TTL on Auto unless you have a reason to change it.
  6. For A and AAAA records, choose proxied or DNS-only. Then save.

The editor validates the syntax before it publishes. Once saved, the record is live on our nameservers within seconds.

If you're moving from another provider, you don't have to add records one by one. Import them through Cloudflare OAuth, a public DNS scan or a pasted zone file, then review the result.

How to look up records with dig

Query each type you care about. The dig tool shows exactly what's published:

dig example.com A +short
203.0.113.10

dig example.com MX +short
10 mx1.example.net.
20 mx2.example.net.

To see what Bridge is serving before your delegation changes, ask our nameserver directly: dig @ns1.bb-ns.com example.com TXT. On Windows, nslookup -type=MX example.com does the same job.

Don't rely on dig example.com ANY to list everything. Many servers, Bridge included, answer ANY queries with a minimal response, as RFC 8482 recommends. You'll see one record, not the zone. Query type by type instead.

Common record mistakes

  • A missing trailing dot in a zone file. mail.example.net without the dot becomes mail.example.net.example.com. Mail then goes nowhere.
  • A CNAME next to other records. A CNAME on shop plus a TXT on shop breaks the rule in RFC 1034. Resolvers may ignore one of them.
  • Two SPF TXT records on one name. RFC 7208 allows exactly one. With two, SPF fails with a permanent error, and receivers may treat your mail as unauthenticated.
  • MX pointing at an IP or at a CNAME. An MX target must be a hostname with its own A or AAAA record (RFC 2181, RFC 5321).
  • A CAA record that leaves out your certificate authority. Renewals start failing silently, months after the record was added.
  • Raising TTLs right before a change. Resolvers then hold the old answer longer, which is the opposite of what you want.

How TTL works on each record

Every record carries a TTL. Auto TTL resolves to 60 seconds for A, AAAA, and CNAME records and 120 seconds for every other record type. You can set a custom TTL per record.

Short defaults limit how long resolvers cache a value under those settings. Lower the TTL ahead of a planned change, and raise it only on records that really don't move. The DNS TTL guide has recommended values by type.

DNS records questions

What are DNS records?

DNS records are entries in a domain's zone file that map names to data: IP addresses, mail servers, aliases and text values. Authoritative nameservers publish them, and resolvers query them whenever someone visits a site or sends an email.

How many types of DNS records are there?

IANA lists dozens of record types, but a working domain usually needs fewer than ten: A, AAAA, CNAME, MX, TXT, NS, SOA and sometimes CAA or SRV. Bridge DNS supports 11 editable types, including HTTPS, SVCB and TLSA.

What are the most common DNS records?

A and AAAA for addresses, CNAME for aliases, MX for mail, and TXT for SPF, DKIM, DMARC and verification. NS and SOA exist in every zone, but on Bridge DNS we manage the apex ones for you.

How do I look up the DNS records for a domain?

Run dig example.com <TYPE> for each type, for example dig example.com MX. Don't use ANY, because most servers return a minimal answer to it. On Windows, use nslookup -type=TXT example.com.

Can two DNS records have the same name?

Yes, as long as they're compatible. One name can hold A, AAAA, MX and TXT records at once, and several records of the same type. The exception is CNAME, which must be the only record on its name.

Why don't my DNS records update immediately?

Changes apply at the authoritative edge within seconds. Resolvers that cached the old value keep it until its TTL expires. Auto TTL resolves to 60 seconds for A, AAAA, and CNAME records and 120 seconds for every other record type.

See also the Bridge DNS documentation.