You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[DNS] Review set-up-cname-flattening and add per-record Dash option (#18053)
* Add Dash and API tabs for Per-record CNAME flattening
* Overall text review
* Fix paid accounts to paid zones
* Add API tab to Flatten all CNAMEs section
* Apply suggestion from code review
Co-authored-by: Pedro Sousa <[email protected]>
---------
Co-authored-by: Pedro Sousa <[email protected]>
Copy file name to clipboardExpand all lines: src/content/docs/dns/cname-flattening/index.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,9 @@ This functionality is also what allows you to use a [root custom domain](/pages/
22
22
23
23
With `CNAME` flattening, Cloudflare finds the IP address that a `CNAME` points to. This process could involve a single lookup or multiple (if your `CNAME` points to another `CNAME`). Cloudflare then returns the final IP address instead of a `CNAME` record, helping DNS queries resolve up to 30% faster.
24
24
25
-
For more details on the mechanics of`CNAME` flattening, review the [CNAME flattening diagram](/dns/cname-flattening/cname-flattening-diagram/) and refer to the [Cloudflare blog post](https://blog.cloudflare.com/introducing-cname-flattening-rfc-compliant-cnames-at-a-domains-root/).
25
+
For more details on the steps involved in`CNAME` flattening, review the [CNAME flattening diagram](/dns/cname-flattening/cname-flattening-diagram/) and refer to the [Cloudflare blog post](https://blog.cloudflare.com/introducing-cname-flattening-rfc-compliant-cnames-at-a-domains-root/).
26
26
27
27
## Aspects to keep in mind
28
28
29
-
*`CNAME` flattening happens by default in some cases, as explained in its [Setup page](/dns/cname-flattening/set-up-cname-flattening/)
29
+
*`CNAME` flattening happens by default in some cases. Refer to [Setup](/dns/cname-flattening/set-up-cname-flattening/) for details.
@@ -25,24 +25,51 @@ If the `CNAME` target is on the same zone as the `CNAME` record, Cloudflare proc
25
25
26
26
## For all CNAME records
27
27
28
-
Accounts on paid plans can choose to flatten all `CNAME` records on their domain. This option is useful for DNS-only (unproxied) `CNAME` records since proxied records are flattened by default (as they return Cloudflare IPv4 and IPv6 addresses).
28
+
For zones on paid plans, you can choose to flatten all `CNAME` records. This option is useful for <GlossaryTooltipterm="proxy status">DNS-only (unproxied)</GlossaryTooltip> `CNAME` records. [Proxied records](/dns/manage-dns-records/reference/proxied-dns-records/#proxied-records) are flattened by default as they return Cloudflare anycast IPs.
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login) and select your account and domain.
31
33
2. Go to **DNS** > **Settings**.
32
-
3. For **CNAME Flattening**, select **Flatten all CNAMEs**.
34
+
3. Turn on the option **CNAME flattening for all CNAME records**.
35
+
36
+
</TabItem> <TabItemlabel="API">
37
+
38
+
Make a `PATCH` request to the [Update DNS Settings](/api/operations/dns-settings-for-a-zone-update-dns-settings) endpoint and set `flatten_all_cnames` to `true` in the request body.
39
+
40
+
</TabItem> </Tabs>
33
41
34
42
:::caution
35
43
<Renderfile="cname-flattening-callout" />
36
44
:::
37
45
38
46
## Per record
39
47
40
-
Accounts on paid plans also have the option to flatten specific `CNAME` records. This operation is currently only supported via API.
48
+
Paid zones also have the option of flattening specific `CNAME` records.
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login) and select your account and domain.
53
+
2. In **DNS** > **Settings**, make sure that **CNAME flattening for all CNAME records** is turned off.
54
+
3. Go to **DNS** > **Records** and find the `CNAME` record you would like to flatten.
55
+
4. Select **Edit** and turn on the **Flatten** option.
56
+
5. Select **Save** to confirm.
57
+
58
+
:::note[Unavailable flatten option]
59
+
For the following cases, **Flatten** will not be available:
60
+
- The record is at the [zone apex](#for-your-zone-apex).
61
+
- The record is already proxied, which means it will be flattened by default.
62
+
-**CNAME flattening for all CNAME records** is turned on, which means you cannot override it per record.
63
+
:::
64
+
65
+
</TabItem> <TabItemlabel="API">
41
66
42
67
With the available [API endpoints](/api/operations/dns-records-for-a-zone-create-dns-record), specify the following for each `CNAME` record in the request body:
Copy file name to clipboardExpand all lines: src/content/partials/dns/cname-flattening-callout.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,4 +3,4 @@
3
3
4
4
---
5
5
6
-
If a `CNAME` target is being used to verify a domain for a third-party service, enabling the [Flatten all CNAMEs](/dns/cname-flattening/set-up-cname-flattening/#for-all-cname-records)setting may cause that functionality to work incorrectly since the `CNAME` record itself will not be returned directly.
6
+
If a `CNAME` target is being used to verify a domain for a third-party service, turning on [CNAME flattening for all CNAME records](/dns/cname-flattening/set-up-cname-flattening/#for-all-cname-records) may cause the verification to fail since the `CNAME` record itself will not be returned directly.
0 commit comments