Skip to content

Commit f78ea46

Browse files
[DNS] Add cf-flatten tag for per-record CNAME flattening (#18523)
* Add cf-flatten to cname-flattening, export, and attributes docs * Clarify the tag is added to flattened records * Clarify use of tag on import-and-export.mdx * Apply suggestion from code review Co-authored-by: Maddy <[email protected]> --------- Co-authored-by: Maddy <[email protected]>
1 parent a6864ce commit f78ea46

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Make a `PATCH` request to the [Update DNS Settings](/api/operations/dns-settings
4747

4848
Paid zones also have the option of flattening specific `CNAME` records.
4949

50+
If you use this option, a special [tag](/dns/manage-dns-records/reference/record-attributes/) `cf-flatten` will be added to the respective flattened `CNAME` records in your zone file, allowing you to [export and import records](/dns/manage-dns-records/how-to/import-and-export/) without losing this configuration.
51+
5052
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
5153

5254
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login) and select your account and domain.

src/content/docs/dns/manage-dns-records/how-to/import-and-export.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ f.example.com. 60 IN A 1.1.1.1 ; this is the comment cf_tags=tag1:value1,ta
9090
g.example.com. 60 IN A 1.1.1.1
9191
```
9292

93+
### cf-flatten tag
94+
95+
If you are on a paid zone and want to use [Per-record CNAME flattening](/dns/cname-flattening/set-up-cname-flattening/#per-record), use the tag `cf-flatten` next to each flattened CNAME record in your zone file. On export, this tag is automatically added to reflect the record configuration that you have on your zone.
96+
9397
## DNS zone file directives
9498

9599
A DNS zone file can be constructed using directives in addition to resource records (RRs). Directives start with `$` and are standardized - `$ORIGIN` and `$INCLUDE` are defined in [RFC 1035](https://www.rfc-editor.org/rfc/rfc1035#section-5.1), and `$TTL` is defined in [RFC 2308](https://www.rfc-editor.org/rfc/rfc2308). Additionally, BIND provides the [non-standard](https://bind9.readthedocs.io/en/latest/chapter3.html#bind-primary-file-extension-the-generate-directive) `$GENERATE` directive.

src/content/docs/dns/manage-dns-records/reference/record-attributes.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Create or edit record attributes just like any other aspect of DNS records, whet
5151

5252
You can also add or edit attributes by [exporting and re-importing](/dns/manage-dns-records/how-to/import-and-export/#dns-record-attributes) your records, or using the [Batch record changes API](/dns/manage-dns-records/how-to/batch-record-changes/#use-the-api).
5353

54+
When exporting and importing, a special tag `cf-flatten` allows you to control [CNAME flattening for individual records](/dns/cname-flattening/set-up-cname-flattening/#per-record). On export, this tag is automatically added to reflect the record configuration you have on your zone.
55+
5456
***
5557

5658
## Reference

0 commit comments

Comments
 (0)