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
If a domain does not exist in your Cloudflare account, DNSControl
202
205
will automatically add it when `dnscontrol push` is executed.
203
206
207
+
## CNAME flattening
208
+
209
+
Cloudflare supports [CNAME flattening](https://developers.cloudflare.com/dns/cname-flattening/), which resolves CNAME targets to their IP addresses at the edge. This can be enabled zone-wide (for zones on paid Cloudflare plans) or per-record.
210
+
211
+
DNSControl supports per-record CNAME flattening using the `CF_CNAME_FLATTEN_ON` modifier:
**Paid plans only:** Per-record CNAME flattening requires a Cloudflare paid subscription (Pro, Business, or Enterprise). Free plans do not support this feature. If you attempt to enable CNAME flattening on a free zone, the Cloudflare API will return an error.
231
+
{% endhint %}
232
+
233
+
For more information, see [Cloudflare's CNAME flattening documentation](https://developers.cloudflare.com/dns/cname-flattening/).
204
234
205
235
## Old-style vs new-style redirects
206
236
@@ -421,6 +451,18 @@ go test -v -verbose -profile CLOUDFLAREAPI -cfworkers=false
421
451
422
452
When `-cfworkers=false` is set, tests related to Workers are skipped. The Account ID is not required.
423
453
454
+
### CNAME flattening tests
455
+
456
+
Tests for per-record CNAME flattening (`CF_CNAME_FLATTEN_ON`/`CF_CNAME_FLATTEN_OFF`) are disabled by default
457
+
because they require a paid Cloudflare plan. To enable these tests, use the `-cfflatten=true` flag:
458
+
459
+
```shell
460
+
cd integrationTest
461
+
go test -v -verbose -profile CLOUDFLAREAPI -cfflatten=true
462
+
```
463
+
464
+
If you run with `-cfflatten=true` on a free zone, the tests will fail with an error from the Cloudflare API.
465
+
424
466
## Cloudflare special TTLs
425
467
426
468
Cloudflare plays tricks with TTLs. Cloudflare uses "1" to mean "auto-ttl";
0 commit comments