Usage
SVCB records point (sub)domains to (sub)domains. The SVCB record can also include connection parameters (e.g. IP addresses).
Example:
| Type | Name (use @ for root) | Priority | Value | Parameters | TTL |
|---|---|---|---|---|---|
| A | www | 203.0.113.1 | |||
| SVCB | @ | 0 | www.example.com. | ||
| SVCB | _8080._svc | 0 | svc1.example.net. | ||
| SVCB | www | 1 | svc.2example.net. | alpn=h2 |
Description
The zone itself is appended automatically at the end of the entry (e.g. www is interpreted as www.example.com).
Period at the end of the (sub)domain
The entry is used exactly as provided and no domain suffix is appended (e.g. www.example.com. is interpreted as www.example.com).
More information
SVCB (Service Binding) records allow services to announce extra parameters such as supported protocols, alternative endpoints, or IP hints. When a client that supports SVCB records sends a DNS query, it will first check whether an SVCB record is available for the requested domain. Only afterwards, it will check for A and AAAA records.
-
If an SVCB record is available and contains an IP hint, the client will establish a connection to that IP address using the connection parameters defined in the SVCB record.
-
If an SVCB record is available and does not contain an IP hint, the client will retrieve the IP address via an A and AAAA record. The client will establish a connection to that IP address, still using the connection parameters defined in the SVCB record.
The purpose of SVCB records is to minimize the number of lookups required to learn connection details.
The client has to support SVCB records. If a client doesn't support SVCB records, it won't check if an SVCB record is available and all requests are treated as if there is no SVCB record — even if there is. For this reason, you should always add an A record, even if your SVCB record includes an IPv4 hint.
SVCB records have two different modes.
| Priority | 0 | Alias mode | Points a (sub) domain to a different (sub) domain (alias target). This record can also provide additional information appended to the name. |
| ≥ 1 | Service Mode | Points a (sub) domain to the same (sub) domain with additional connection parameters (alternative endpoint). A SVCB record with a lower number will be given the highest priority. This means when a domain receives a request, it will use the SVCB record with the lowest number first. |
SVCB in alias mode and CNAME in comparison:
| SVCB | CNAME |
|---|---|
Can alias the origin (e.g. example.com) |
Can NOT alias the origin (e.g. example.com) |
| Can alias to a service operator that requires consistent configuration parameters (e.g. protocol). | Can only alias to another domain name without supporting additional configuration parameters. |
| Only returned if the client explicitly queries for the SVCB record type. | Returned for any query type if the domain matches, regardless of the requested record type. |
| Multiple records per name possible. | One record per name possible. |
Example parameter keys
| Parameters | alpn | Additional protocols supported by the server |
| no-default-alpn | No support for the default protocol | |
| port | TCP or UDP port of the service | |
| mandatory | Parameter keys required to establish a connection | |
| ipv4hint | List of IPv4 addresses | |
| ipv6hint | List of IPv6 addresses | |
| ech | Encrypted ClientHello |
Usage:
mandatory=alpn,ipv4hint alpn=h2,h3 port=9443 ipv4hint=203.0.113.1,198.51.100.1 ipv6hint=2001:db8::1,2001:db8:5678::1