> For the complete documentation index, see [llms.txt](https://zer0-1.gitbook.io/zns/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zer0-1.gitbook.io/zns/subdomain-distribution.md).

# Subdomain Distribution

### Subdomain Design <a href="#design" id="design"></a>

The `ZNSSubRegistrar` contract is used for registering and managing subdomains. It connects to the `ZNSRootRegistrar` to settle the most crucial domain data (owner, resolver, NFT) and stores subdomain distribution data (pricing, payment, access option) on itself.&#x20;

The `ZNSRootRegistrar` calls the `ZNSSubRegistrar` to get distribution data for root domains as well as to set this data for newly registered root domains.

Every root domain or subdomain in the chain is a potential parent for subdomain distribution and can set its own configs and rules for this. These configs can be changed or turned off at any time by the owner of the relevant domain.

### Distribution

A domain of any level in ZNS supports issuing subdomains. The rules and the availability of subdomains for a certain domain of any level depends on the rules set by the owner of the parent domain. As written in the [Domain Registration](/zns/domain-registration.md) section, parts of the full distribution configuration (excluding pricing) can be set right in the registration transaction. In v2 all of this data could be optionally provided at the time of registration to fully set up a domain with full set of distribution data in one transaction.

There are several necessary configs that need to be set by the domain owner to fully turn on subdomain distribution. They are further detailed in [Base Distribution Configuration](/zns/subdomain-distribution/base-distribution-configuration.md).
