DNS record types·续
- <code>DNS Write</code>
</details>
Create DNS Recordbash
curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"type": "SRV",
"name": "_xmpp._tcp.example.com",
"data": {
"priority": 10,
"weight": 5,
"port": 5223,
"target": "server.example.com"
}
}'
Responsejson
{
"result": {
"id": "<ID>",
"zone_id": "<ZONE_ID>",
"zone_name": "example.com",
"name": "_xmpp._tcp.example.com",
"type": "SRV",
"content": "5 5223 server.example.com",
"priority": 10,
"proxiable": false,
"proxied": false,
"ttl": 1,
"locked": false,
"data": {
"port": 5223,
"priority": 10,
"target": "server.example.com",
"weight": 5
},
"meta": {
"auto_added": false,
"managed_by_apps": false,
"managed_by_argo_tunnel": false,
"source": "primary"
},
"comment": null,
"tags": [],
"created_on": "2022-11-08T15:57:39.585977Z",
"modified_on": "2022-11-08T15:57:39.585977Z"
},
"success": true,
"errors": [],
"messages": []
}
SVCB and HTTPS
Service Binding (SVCB) and HTTPS Service (HTTPS) records allow you to provide a client with information about how it should connect to a server upfront, without the need of an initial plaintext HTTP connection.
If your domain has HTTP/2 or HTTP/3 enabled, proxied DNS records, and is also using Universal SSL, Cloudflare automatically generates HTTPS records on the fly, to advertise to clients how they should connect to your server.
Proxied vs DNS-only names
For proxied (orange cloud) names, Cloudflare synthesizes HTTPS records automatically when Universal SSL is enabled. Manually-added HTTPS records on proxied names are not served — Cloudflare uses the auto-generated records instead.
If you have disabled Universal SSL (for example, because you use Advanced Certificates exclusively), Cloudflare will not generate HTTPS records for proxied names. Cloudflare only advertises an HTTPS record for names it knows have an active certificate — advertising HTTPS for a name without one would cause connections to fail.
If Universal SSL is turned off, Cloudflare does not generate HTTPS records for proxied names even if you have a custom or Advanced Certificate active. To restore HTTPS record generation, turn Universal SSL back on — your custom or Advanced Certificate will still take priority over it for connections, as described in certificate and hostname priority. If you need to keep Universal SSL turned off, contact Cloudflare Support.
For DNS-only (grey cloud) names, you can manually add HTTPS records and Cloudflare will serve them. However, all records with the same name must be DNS-only for the manual HTTPS record to be served.
<details>
<summary>
Example: Manual HTTPS records and proxy status
</summary>
For Cloudflare to serve a manually-added HTTPS record, every record with the same name must be DNS-only (grey cloud).
Will work — All records with the same name are DNS-only:
| Type | Name | Content | Proxy status |
|---|---|---|---|
| A | example.com | <code>192.0.2.1</code> | DNS only |
| HTTPS | example.com | <code>1 . alpn="h3"</code> | - |
The HTTPS record will be served because the A record is DNS-only.
Will not work — Mixed proxy status for the same name:
| Type | Name | Content | Proxy status |
|---|---|---|---|
| AAAA | example.com | <code>2001:db8::1</code> | Proxied |
| HTTPS | example.com | <code>1 . alpn="h3"</code> | - |
The HTTPS record will not be served because the AAAA record with the same name is proxied.
</details>
For more details and context, refer to the announcement blog post ↗︎ and RFC 9460 ↗︎.
For field definitions, refer to the API documentation (visible once you select the record type under the request body specification).
PTR
A pointer (PTR) record ↗︎ specifies the allowed hosts for a given IP address.
Within Cloudflare, PTR records are used for reverse DNS lookups and should preferably be added to reverse zones.
For field definitions, refer to the API documentation (visible once you select the record type under the request body specification).
SOA
A start of authority (SOA) record stores information about your domain such as admin email address, when the domain was last updated, and more. Refer to What is a DNS SOA record ↗︎ for an example.
If you are using Cloudflare for your authoritative DNS, you do not need to create an SOA record. Cloudflare creates this record automatically when you start using Cloudflare's authoritative nameservers.
With Enterprise accounts, you also have the option to change the SOA record values that Cloudflare will use:
- As a DNS zone default: Define the SOA record values that Cloudflare will use for all new zones added to your account. Refer to Configure DNS zone defaults for step-by-step guidance.
- For existing zones: Override the defaults or Cloudflare-generated values under DNS record options on the DNS Records ↗︎ page.
Refer to the following list for information about each SOA record field:
<details>
<summary>
SOA record fields
</summary>
- <code>MNAME</code>: The primary nameserver for the zone. Secondary nameservers receive zone updates from the nameserver specified in this field.
- <code>RNAME</code>: The email address of the administrator responsible for the zone.
The <code>@</code> symbol is replaced by the first dot. If an email address contains a dot before <code>@</code>, this should be represented as <code>.</code>.
| <code>RNAME</code> | |
|---|---|
| <code>john@example.com</code> | <code>john.example.com</code> |
| <code>john.doe@example.com</code> | <code>john.doe.example.com</code> |
| - <code>Serial</code>: The serial number for the zone. Secondary nameservers initiate zone transfers if this number increases. | |
| - <code>Refresh</code>: Time (in seconds) after which a secondary nameserver should query the primary for the <code>SOA</code> record, to detect zone changes. Only relevant if DNS NOTIFY (<a href="https://www.rfc-editor.org/rfc/rfc1996.html">RFC 1996 ↗︎</a>) is not configured. |
| Default | Minimum | Maximum |
|---|---|---|
| <code>10000</code> | <code>600</code> | <code>86400</code> |
| - <code>Retry</code>: Time (in seconds) after which a secondary nameserver should retry getting the serial number from the primary nameserver after a failed attempt. Any specified values must not be greater than <code>Refresh</code>. |
| Default | Minimum | Maximum |
|---|---|---|
| <code>2400</code> | <code>600</code> | <code>3600</code> |
| - <code>Expire</code>: Time (in seconds) after which a secondary nameserver should stop answering queries for a zone if the primary does not respond. Any specified values must not be smaller than <code>Refresh</code>. |
| Default | Minimum | Maximum |
|---|---|---|
| <code>604800</code> | <code>86400</code> | <code>2419200</code> |
| - <code>Record TTL</code>: The <a href="https://developers.cloudflare.com/dns/manage-dns-records/reference/ttl/">time to live</a> of the SOA record. |
| Default | Minimum | Maximum |
|---|---|---|
| <code>3600</code> | <code>1800</code> | <code>3600</code> |
| - <code>Minimum TTL</code>: The TTL for caching negative responses. Refer to <a href="https://www.rfc-editor.org/rfc/rfc2308.html#section-4">RFC 2308 ↗︎</a> for details. |
| Default | Minimum | Maximum |
|---|---|---|
| <code>1800</code> | <code>60</code> | <code>86400</code> |
</details>
Note
When you query the SOA record itself, the TTL in the response is the smaller of the Record TTL and the Minimum TTL values. For example, if Record TTL is 3600 and Minimum TTL is 1800, the SOA record is returned with a TTL of 1800.
NS
A nameserver (NS) record ↗︎ indicates which server should be used for authoritative DNS.
You only need to add NS records to your DNS records table in Cloudflare when you are using subdomain setup or delegating subdomains outside of Cloudflare.
For field definitions, refer to the API documentation (visible once you select the record type under the request body specification).
Note
Your assigned Cloudflare nameservers, custom nameservers, and their corresponding nameserver TTLs are controlled via dedicated sections on the DNS Records ↗︎ page. For details, refer to Nameservers.
Limits
When creating NS records, there are limits on the number of nameservers that can be associated with a single delegation name.
According to DNS standards defined in RFC 1912 ↗︎, a delegation should not include more than seven nameserver names for the same delegation name.
To align with these standards and maintain platform stability:
- Cloudflare supports up to 10 NS records per delegation name, but the best practice is to keep the set at seven or fewer.
- Creating more than 10 NS records for the same name is not supported. Requests that exceed this limit may be rejected or fail validation.
<details>
<summary>
Example
</summary>
DNS management for example.com:
| Type | Name | Content |
|---|---|---|
| NS | blog | <code>ns1.externalhost.com</code> |
| NS | blog | <code>ns2.externalhost.com</code> |
| NS | blog | <code>ns3.externalhost.com</code> |
| NS | blog | <code>ns4.externalhost.com</code> |
| NS | blog | <code>ns5.externalhost.com</code> |
| NS | blog | <code>ns6.externalhost.com</code> |
| NS | blog | <code>ns7.externalhost.com</code> |
| NS | blog | <code>ns8.externalhost.com</code> |
| NS | blog | <code>ns9.externalhost.com</code> |
| NS | blog | <code>ns10.externalhost.com</code> |
In this example, Cloudflare would prevent you from adding another NS record for the delegation name <code>blog</code>.
</details>
DS and DNSKEY
DS and DNSKEY ↗︎ records help implement DNSSEC, which cryptographically signs DNS records to prevent domain spoofing.
Most Cloudflare domains do not need to add these records and should instead follow our DNSSEC setup guide.
For field definitions, refer to the API documentation (visible once you select the record type under the request body specification).
Other
Cloudflare also supports other record types that are less common, such as URI, NAPTR, and certificate-related record types (SSHFP, TLSA, SMIMEA, and CERT). Refer to our blog post ↗︎ for more information.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/dns/manage-dns-records/reference/dns-record-types/#page","headline":"DNS record types","description":"DNS record types supported by Cloudflare.","url":"https://developers.cloudflare.com/dns/manage-dns-records/reference/dns-record-types/","inLanguage":"en","image":"https://developers.cloudflare.com/dns/manage-dns-records/reference/dns-record-types/og.png?v=a410073f748f42e8","dateModified":"2026-10-15","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Attributes and metadata for DNS records. title: Record attributes image: https://developers.cloudflare.com/dns/manage-dns-records/reference/record-attributes/og.png?v=9eb10a13c4fb982e
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/dns/llms.txt
Use this file to discover all available pages before exploring further.
Docs