Skip to content
AnswerWell geo Documentation

Research · 9 min read · Answerwell

Subdomain Setup, DNS Delegation, and Child Zone Management

When and how to run a subdomain as its own DNS zone via delegation, parent and child setup limits, shadowed records, and Access.

This page summarises Cloudflare documentation on subdomain setup: managing one or more subdomains as separate Cloudflare zones from the apex domain, using DNS delegation. That is not the same as adding a normal subdomain record inside an existing zone. For a single hostname under an apex you already manage, see Create subdomain records.

Subdomain setup vs subdomain records: what people mean

Section titled “Subdomain setup vs subdomain records: what people mean”

A subdomain record (for example blog under example.com) is an A, AAAA, or CNAME in the parent zone. The parent zone stays the only place you manage DNS for that name.

Subdomain setup gives the subdomain its own zone (for example blog.example.com as its own site in the account) by delegating authority with NS records in the parent. Teams can get separate Cloudflare configuration, billing context, and access without touching the apex zone.

When you use a subdomain setup, you can manage the Cloudflare configurations for one or more subdomains separately from those associated with your apex domain. This means that, on your account homepage, you would find websites like example.com or blog.example.com listed as separate zones.

— Cloudflare, Subdomain setup

Subdomain setup is Enterprise-only. If you only need a hostname under an existing zone, use Create subdomain records or Configuration Rules / Page Rules on non-Enterprise plans.

Subdomain setup is only available for Enterprise accounts. If you only want to create a subdomain for your site in Cloudflare, refer to Create a subdomain record.

— Cloudflare, Setup

Yes. Enterprise customers can add subdomains directly to Cloudflare via subdomain support.

— Cloudflare, FAQ

DNS delegation and zone apex: how a child zone works

Section titled “DNS delegation and zone apex: how a child zone works”

Delegation means the parent zone publishes NS records for a label (for example blog), and resolvers follow those nameservers for blog.example.com and everything below it.

Subdomain setup relies on a process known as delegation. When, in a parent domain such as example.com, an NS record is created for a subdomain blog.example.com, this means that DNS management for the subdomain can be done separately, in its own DNS zone.

— Cloudflare, Setup

The zone apex of the child zone is the delegated name itself (for example sub.example.com), not the parent apex:

The zone apex is the highest-level domain within a zone — the starting point from which all DNS records in that zone are managed.

In most cases, the zone apex is the same as the apex domain (for example, example.com). However, with subdomain delegation (available on Enterprise plans), a subdomain like sub.example.com can be its own zone, making that subdomain the zone apex.

— Cloudflare, Concepts

Records at the child zone apex use @ as the record name in the dashboard. A label like blog in the child zone becomes blog.sub.example.com when the zone apex is sub.example.com.

Parent and child zone types you can combine

Section titled “Parent and child zone types you can combine”

Which combinations work depends on both zones. The table below assumes active zones; pending parent conversion has exceptions described in Setup.

Parent zone Child zone Subdomain setup available
Full or Secondary Full Yes
Full or Secondary Secondary Yes
Full or Secondary Partial No
Partial Full Yes
Partial Secondary Yes
Partial Partial Yes

Subdomains using a CNAME setup (partial) represent an exception in the sense that delegation does not apply in this context. As explained in the dedicated CNAME setup (Partial) section, this setup is intended to simply proxy individual subdomains through Cloudflare.

— Cloudflare, Setup

Parent zone on full setup: NS delegation in Cloudflare DNS

Section titled “Parent zone on full setup: NS delegation in Cloudflare DNS”

When Cloudflare is authoritative for the parent (full setup), child zone nameservers differ from the parent’s. Steps depend on whether the subdomain already has records in the parent.

No existing subdomain records: add the child as a new zone, complete full or secondary onboarding for the child, copy the child’s assigned nameservers from DNS Records, then add two NS records in the parent for that label (for example www → john.ns.cloudflare.com and melinda.ns.cloudflare.com). After propagation, build DNS in the child zone.

Subdomain already has A/AAAA/CNAME in parent: create the child zone, move all records for that subtree (including deeper names like api.www.example.com), migrate WAF rules, Workers, and related settings, order advanced SSL covering the child apex and deeper names, then replace address records in the parent with NS records pointing at the child nameservers. Delete remaining parent records at or below the delegation except those NS records. Cloudflare recommends flushing cached answers on public resolvers (for example 1.1.1.1 and 8.8.8.8) before cutover.

If you have already created DNS records covering your subdomain in the parent zone: … In your child zone, make sure you have all DNS records that relate to the subdomain. This includes all DNS records deeper than the delegated subdomain.

— Cloudflare, Parent zone on full setup

Batch API changes in the parent are supported; see Batch record changes in that guide.

Parent zone on partial setup: external DNS and CNAME paths

Section titled “Parent zone on partial setup: external DNS and CNAME paths”

When another provider maintains authoritative DNS for the apex (partial parent), you either add NS records at the external provider (full/secondary child) or use CNAME setup on the child with verification TXT and {hostname}.cdn.cloudflare.net targets—details are in Parent zone on partial setup. The verification TXT (for example cloudflare-verify.sub.example.com) must stay in place for as long as the child uses partial setup on Cloudflare.

Delegating subdomains outside Cloudflare (contrast)

Section titled “Delegating subdomains outside Cloudflare (contrast)”

Outgoing delegation from a full Cloudflare parent uses NS records at the parent to hand a label to external nameservers. Cloudflare’s CDN and security are not applied to that delegated subtree.

DNS delegation is not possible for Cloudflare domains using a CNAME setup (partial).

— Cloudflare, Delegate subdomains

Incoming delegation to Cloudflare is the subdomain setup flow; see Delegate subdomains (incoming) pointing to subdomain setup docs.

Shadowed records: why parent A records stop working

Section titled “Shadowed records: why parent A records stop working”

Adding NS delegation shadows any records at or below that name in the parent. They may still appear in the dashboard but are not authoritative.

When you add an NS record to your zone, you create a subdomain delegation … Any record you keep at or below that delegation point is shadowed. It stays stored in your zone, but the delegation places authority for that name with the delegated nameservers, so the record is not part of the authoritative data your zone is meant to serve.

— Cloudflare, Shadowed records

NS records block conflicting A/AAAA/CNAME in the parent

Section titled “NS records block conflicting A/AAAA/CNAME in the parent”

If a child already exists as its own subdomain zone, the parent must hold NS records and cannot add address records for the same label:

When you are managing DNS records for the parent zone (in this example, example.com), you cannot create IP address resolution records (A, AAAA, or CNAME) with a name that specifies the same subdomain that already exists as a separate subdomain zone.

— Cloudflare, NS records already exist

Removing NS records to add A records may revert subdomain setup and cause downtime; use Rollback subdomain setup first.

Glue A/AAAA records are required when a delegation’s nameserver hostname lives inside the delegated zone. Shadow metadata (shadowed_by, is_glue, dead_glue, shadowed_records_count) helps find mistakes. Request it with include_shadow_metadata=true on the DNS records API:

curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records?include_shadow_metadata=true" \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN"

List records shadowed by a delegation with shadowed_by_name=sub.example.com; find delegations affecting a name with shadowing_name=www.sub.example.com (see Shadowed records).

SSL/TLS, Access, and Cloudflare One app paths

Section titled “SSL/TLS, Access, and Cloudflare One app paths”

Certificates: If the child zone already has an active certificate for a hostname, a parent zone certificate pack that includes the same hostname fails validation.

If a certificate is already active on the child zone for a specific hostname (subdomain.example.com), any certificate pack containing that exact hostname in the parent zone (example.com) will fail validation.

— Cloudflare, Setup

Cloudflare Access: Child domains appear in the Domain dropdown when using Application paths with subdomain setups. Re-save Access apps after the child zone leaves pending or after splitting out a subdomain.

If the child zone is in a pending state when you create the Access application, your configuration will not automatically apply when you activate the zone. You must also re-save the Access application once your subdomain setup is active.

— Cloudflare, Subdomain setup

Parent analytics: DNS query stats on the parent for child hostnames are normal—resolvers query the parent for NS referrals before asking the child.

This is normal DNS behavior — recursive resolvers query the parent zone first to get the referral (NS records) pointing to the child zone’s nameservers.

— Cloudflare, Subdomain setup

Move child zone to another account: add the subdomain in the new account, export DNS from the old child zone, import after cleanup, then update NS in the parent to the new child nameservers (Migrate to new account).

Rollback to a single parent zone: export child records, delete one NS in the parent, convert the remaining NS entry back to address records, import former child records—expect possible downtime (Rollback).

Terraform (Enterprise subdomain zone): create a cloudflare_zone for subdomain.example.com with type = "full", then add NS delegation in the parent before activation (Create a subdomain zone using Terraform). Partial child zones via Terraform use separate steps including plan upgrades (Create a partial zone using Terraform).

Google Search Console: child hostnames on a domain property

Section titled “Google Search Console: child hostnames on a domain property”

For a domain-level Search Console property with multiple child hosts, Crawl Stats can show aggregated or per-child data; only the top 20 child domains by traffic in the last 90 days appear in the Hosts list.

If your property is at the domain level (example.com, http://example.com, https://m.example.com), and it contains two or more child domains (say fr.example.com and de.example.com), you can see data for the parent, which includes all children, or scoped to a single child domain.

— Google, Crawl Stats report

  • Treating subdomain setup like a single A record in the parent while NS delegation exists (records are shadowed or API rejects duplicates).
  • Leaving parent A/CNAME records under a delegated label after NS cutover.
  • Forgetting deeper names (api.www.example.com) when moving a www child zone.
  • Creating Access policies while the child zone is still pending without re-saving after activation.
  • Requesting a parent Universal SSL pack that duplicates hostnames already certified in the child zone.
  • Removing NS records to “fix” resolution without following Rollback.
  1. In the Cloudflare dashboard, confirm the child appears as its own zone on the account home and that the parent zone has NS records (not conflicting A/AAAA/CNAME) for the delegated label—see Parent zone on full setup and NS records already exist.

  2. Query public DNS (for example via the Dig Web Interface linked from partial-setup docs) for the child apex and a few deeper hostnames; answers should come from the child zone nameservers after delegation.

  3. In the parent zone, review DNS record warnings or call the API with include_shadow_metadata=true to ensure no unintended shadowed records remain.

  4. For domain properties, open Google Search Console Crawl Stats and scope to a child host if you split traffic by subdomain.

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact wording you are asking about so it can be corrected.