Record types
Look up the 11 Edge DNS record types, the value format each one takes, the rules Edge DNS enforces per type, and how wildcard names match.
A record type sets what a record’s value means and which format the value takes. Edge DNS hosts 11 record types, and the API refuses any other type, such as SOA, with 10039. This page lists each type’s value format and the rules Edge DNS enforces for it. A record’s other fields, such as its name, TTL, policy, and weight, are on Zones and records.
The value is the Value field in Azion Console, one value per line. In the API it is the rdata array, and in the Azion CLI the --rdata flag. The Up to 10 values column says how many values one record of the type holds. The Weighted policy column says whether a record of the type accepts the weighted policy, which shares a name’s answers among several records by weight.
| Type | Console option | Value format | Up to 10 values | Weighted policy | RFC |
|---|---|---|---|---|---|
| A | A - IPv4 Address | An IPv4 address | Yes | Yes | RFC 1035 |
| AAAA | AAAA - IPv6 Address | An IPv6 address | Yes | Yes | RFC 3596 |
| ANAME | ANAME - Maps a name to another name | A hostname under azioncdn.net, azionedge.net, or azionedge.com |
Yes | Yes | draft-ietf-dnsop-aname-04 |
| CAA | CAA - Certification Authority Authorization | [flags] [tag] "[value]" |
No, more than 10 values are accepted | No | RFC 8659 |
| CNAME | CNAME - Canonical name | A hostname | No, exactly one value | Yes | RFC 1035 |
| DS | DS - Delegation Signer | [key tag] [algorithm] [digest type] [digest] |
Yes | No | RFC 3658 |
| MX | MX - Mail exchange | [priority] [mail server hostname] |
Yes | Yes | RFC 1035 and RFC 7505 |
| NS | NS - Name Servers | A nameserver hostname | Yes | No | RFC 2782 |
| PTR | PTR - Reverse DNS lookup | A hostname | No, exactly one value | No | RFC 1035 |
| SRV | SRV - Location of server or service | [priority] [weight] [port] [target] |
No, more than 10 values are accepted | No | RFC 2782 |
| TXT | TXT - Text | Text, up to 1,000 characters per value | No, more than 10 values are accepted | No | RFC 1035 and RFC 1464 |
A TXT or NS record with the weighted policy is refused with 19017. For how a weighted record is chosen, refer to How Edge DNS works.
A
An A record, also called a host record, maps a name to an IPv4 address. The value is an IPv4 address, such as 192.0.2.1 on a record named www.
A record holds up to 10 values, one per line in the Console. An eleventh value is refused with 19007, and a value that is not an IPv4 address, such as 300.1.1.1, is refused with 19003. An A record accepts the weighted policy. For how to share traffic among addresses by weight, refer to Weight records to balance traffic.
AAAA
An AAAA record maps a name to an IPv6 address. The value is an IPv6 address, such as 2001:db8::1 on a record named www.
A record holds up to 10 values, one per line in the Console. An eleventh value is refused with 19007. An AAAA record accepts the weighted policy.
ANAME
An ANAME record, also called an ALIAS record, is a virtual record type that gives the zone apex a CNAME-like behavior. It points a name at an Azion hostname and is answered as an A record. Use it to serve an apex domain, such as example.com, through other Azion products.
The value is a hostname in FQDN format, never an IP address, such as <your-workload>.map.azionedge.net. Edge DNS enforces these rules on an ANAME record:
- The TTL is
20and nothing else. Any other TTL, including the default of 3600, is refused with19011. Keep the TTL at 20. - Each value is a name under
azioncdn.net,azionedge.net, orazionedge.com. Any other target is refused with19016. - A record holds up to 10 values. An eleventh value is refused with
19007. - The name can be
@or any other name in the zone. - An ANAME record can share its name with records of other types, such as MX and TXT.
- It accepts the
weightedpolicy.
In the Console, selecting ANAME - Maps a name to another name pre-fills TTL (seconds) with 20 and disables Weight. For the full procedure, refer to Point an apex domain with ANAME.
CAA
A CAA record names the certificate authorities (CAs) allowed to issue certificates for a domain or its subdomains. The value takes three parts separated by spaces, [flags] [tag] "[value]", such as 0 issue "letsencrypt.org" on a record named @. A flags value of 0 turns every flag off.
The tag is written in lower case and is one of these:
| Tag | What it means |
|---|---|
issue |
The CA named in the value can issue a certificate for the domain or a subdomain. |
issuewild |
The CA named in the value can issue a wildcard certificate for the domain or a subdomain. |
iodef |
The CA notifies the domain owner of an invalid certificate request, at the mailto:, http://, or https:// address in the value. |
The value part always goes between double quotes, and its content depends on the tag. A record accepts more than 10 values, one per line in the Console. These are CAA values:
A CAA record on a name that holds a CNAME is refused with 19018; a CNAME elsewhere in the zone does not block it. For a complete example, refer to Restrict issuers with a CAA record.
CNAME
A CNAME record makes a name an alias of another hostname. A resolver that gets a CNAME repeats the lookup with the hostname it points to.
The value is one hostname in FQDN format, such as www.example.com on a record named blog. Edge DNS enforces these rules on a CNAME record:
- The value is a hostname, never an IP address. An IP address, such as
192.0.2.1, is refused with19002 Invalid Domain Name, whose detail readsPlease enter the domain name following the format FQDN. IP addresses are not acceptable for this kind of record. - It holds exactly one value. A second value is refused with
19006, whose detail readsThe 'rdata' cannot contain more than one item when 'type' is 'CNAME'. - It cannot be named
@. A CNAME at the zone apex is refused with19005. At the apex, use an ANAME record for an Azion target. - It blocks every other type on its name. A record of another type, such as A, MX, or CAA, on a name that holds a CNAME is refused with
19018. - It accepts the
weightedpolicy.
When the target is a name in the same zone, Edge DNS answers the CNAME and the target’s records in the same response. A query for blog.example.com returns the CNAME to www.example.com and the A record of www. For a complete example, refer to Point a subdomain with a CNAME record.
DS
A DS (Delegation Signer) record is a link in the DNSSEC chain of trust. It shows that a delegated child zone can be trusted, because it holds a hash, the digest, of that zone’s key-signing key.
The value takes four fields, [key tag] [algorithm] [digest type] [digest], such as 12345 13 2 3A1F…8192 on a record named sub. Add a DS record to delegate a signed child zone, on the same name as the NS record that delegates it. A record holds up to 10 values; an eleventh value is refused with 19007.
You add no DS record to sign your own zone: Azion publishes the zone’s DNSSEC records itself. For signing a zone and the DS values your registrar needs, refer to DNSSEC.
MX
An MX record names the SMTP mail server for a domain, which mail servers use to route email to the domain. The value takes the priority, then the mail server’s hostname, separated by a space. The Console hint reads Accepts the format: [preference] [mail exchanger].
A record on @ that names two mail servers holds one value per line:
A record holds up to 10 values. An eleventh value is refused with 19007. An MX record accepts the weighted policy. For a complete example, refer to Receive mail with MX records.
NS
An NS record names the authoritative nameservers for a name. Add one on a subdomain’s name to delegate the subdomain to other nameservers, which must have authority over it.
The value is a nameserver’s hostname in FQDN format, never an IP address. Add one value for each of the subdomain’s nameservers, such as these on a record named sub:
A record holds up to 10 values. An eleventh value is refused with 19007, and the weighted policy is refused with 19017. An IP address as the value is refused with 19022 Invalid NS Record Answer: Invalid value for NS type. You need to use FQDN format. An NS record cannot be named @, the zone’s own domain, and one there is refused with 19021 Invalid NS Record Entry: NS records cannot be used at the zone apex or domain root. The zone’s own nameservers are Azion’s, and they are read-only; for their names, refer to Zones and records.
PTR
A PTR record serves a reverse DNS lookup: it maps an IP address back to a hostname. The value is the corresponding forward hostname, such as host.example.com on a record named 1.
A PTR record holds exactly one value. A second value is refused with 19006 Invalid RData For CNAME Record, whose detail names CNAME even for a PTR record: The 'rdata' cannot contain more than one item when 'type' is 'CNAME'.
Create the reverse zone first, then add its PTR records to it. An A record should exist for every PTR record’s hostname; Edge DNS does not check that it does. A reverse DNS setup suits a mail server.
SRV
An SRV (service) record gives the location of the servers for a service, as a hostname and a port. Its DNS type code is 33.
The name takes the form _service._proto, such as _sip._tcp, which answers for _sip._tcp.example.com. A name in any other form, such as *._tcp, is refused with 19019, so an SRV record cannot be a wildcard.
The value takes four fields, [priority] [weight] [port] [target], such as 10 60 5060 sip.example.com. The weight here is the SRV field, not the record’s policy weight. Make sure the target is a hostname with an A or AAAA record: the API accepts a target that does not resolve.
A name holds one SRV record. A second SRV record on the same name is refused with 19004, so add every value to the one record. An SRV record accepts more than 10 values.
TXT
A TXT record attaches arbitrary text to a name, such as human-readable information about a server, a network, or a data center. The Console hint gives the format as "[text]". These are TXT values:
Each line of the Console’s Value field is a separate answer, as is each item of rdata in the API, and a record accepts more than 10 values. A value holds up to 1,000 characters. A longer value is refused with 19024, whose detail reads You need to provide an answer with less than 1000 characters.; a value of exactly 1,000 characters is accepted. The weighted policy is refused with 19017. For a complete example, refer to Verify a domain with a TXT record.
Wildcards
A wildcard record answers queries for names the zone does not define. Name the record * to match every undefined name in the zone, or *.label to match every undefined name under label. A wildcard name is accepted for A, TXT, and MX records. An SRV record cannot be a wildcard: its name must be _service._proto, and a name such as *._tcp is refused with 19019.
Take a zone for example.com that holds these A records:
| Name | Value |
|---|---|
www |
192.0.2.1 |
* |
192.0.2.31 |
*.wildcard |
192.0.2.32 |
*.apps |
192.0.2.10 |
a*b |
192.0.2.33 |
Its nameservers answer these A queries:
| Query | Answer | Record that answers |
|---|---|---|
www.example.com |
192.0.2.1 |
www: a defined name wins over a wildcard. |
ghost.example.com |
192.0.2.31 |
* |
another.wildcard.example.com |
192.0.2.32 |
*.wildcard |
wrong.record.example.com |
192.0.2.31 |
*: no record exists under record, so the zone’s wildcard answers, several labels deep. |
deep.x.apps.example.com |
192.0.2.10 |
*.apps: it matches names more than one label below apps. |
a*b.example.com |
192.0.2.33 |
a*b, as a literal name. |
axb.example.com |
192.0.2.31 |
*: a*b is not a wildcard, so it does not match. |
An asterisk is a wildcard only as a whole label at the left of the name. An asterisk inside a label, as in a*b, is a literal character. For a complete example, refer to Match subdomains with a wildcard record.