Skip to content

Commit 09e620b

Browse files
Add API tab to Flatten all CNAMEs section
1 parent a926da0 commit 09e620b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/content/docs/dns/cname-flattening/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ For more details on the steps involved in `CNAME` flattening, review the [CNAME
2626

2727
## Aspects to keep in mind
2828

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.
3030
* <Render file="cname-flattening-callout" />

src/content/docs/dns/cname-flattening/set-up-cname-flattening.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,18 @@ If the `CNAME` target is on the same zone as the `CNAME` record, Cloudflare proc
2727

2828
For zones on paid plans, you can choose to flatten all `CNAME` records. This option is useful for <GlossaryTooltip term="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.
2929

30+
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
31+
3032
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login) and select your account and domain.
3133
2. Go to **DNS** > **Settings**.
3234
3. Turn on the option **CNAME flattening for all CNAME records**.
3335

36+
</TabItem> <TabItem label="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>
41+
3442
:::caution
3543
<Render file="cname-flattening-callout" />
3644
:::
@@ -51,7 +59,7 @@ Paid zones also have the option of flattening specific `CNAME` records.
5159
For the following cases, **Flatten** will not be available:
5260
- The record is at the [zone apex](#for-your-zone-apex).
5361
- The record is already proxied, which means it will be flattened by default.
54-
- **CNAME flattening for all CNAME records** is turned on, which means you cannot override it per-record.
62+
- **CNAME flattening for all CNAME records** is turned on, which means you cannot override it per record.
5563
:::
5664

5765
</TabItem> <TabItem label="API">

0 commit comments

Comments
 (0)