Delegate a stand-alone subdomain to Netlify DNS
You can bring just a subdomain to Netlify DNS and keep your apex domain on a separate domain registrar. This makes all the benefits of Netlify DNS available to your subdomain, including automated wildcard SSL certificates and expanded use cases for your site with branch subdomains.
For example, you can delegate docs.example.com
to Netlify DNS and keep example.com
on a different domain registrar.
If you delegate the stand-alone subdomain docs.example.com
to Netlify DNS, your site gains these advantages:
- Automatic site security benefits. Netlify DNS provisions your subdomain, and all subdomains of your subdomain, with wildcard SSL certificates.
- More use cases with branch subdomains. Your site can serve different content from different branches using branch subdomains. For example, the
staging
branch of your site can serve unique content atstaging.docs.example.com
. Likewise, your site’sbeta
branch can serve unique content atbeta.docs.example.com
. - Wider reach with IPv6 support. Your subdomain can reach a wider audience with IPv6, which you can enable for your subdomain in the Netlify UI.
- Performance gains with the Netlify CDN. Your site will be served from our global CDN, from the server closest to your site visitors. Between this and CDN-level routing, sites will often gain a performance boost from being served on the Netlify CDN.
# Netlify DNS support for subdomains and apex domains
When you add an apex domain to Netlify DNS, subdomains of this apex domain are managed by Netlify DNS automatically.
If you delegate a stand-alone subdomain to Netlify DNS, additional configuration is required outside of Netlify. You will need to access the domain registrar for the related apex domain to set NS records (Name Server records) for your subdomain.
For example, if you’ve already added the apex domain petsofnetlify.com
to Netlify DNS and you add the subdomain rover.petsofnetlify.com
to your site on Netlify, then Netlify DNS will automatically manage this subdomain for you.
Alternatively, if you have an apex domain that is already managed by an external domain registrar, such as example.com
, and you want to bring just the subdomain docs.example.com
to Netlify DNS, then you need to follow the steps below.
# Delegate a stand-alone subdomain to Netlify DNS
There are two main starting places in the Netlify UI to delegate just a subdomain to Netlify DNS:
- From your team’s Domains page: If you have access to your team’s page, then you can delegate a subdomain to Netlify DNS for your team and use this subdomain for one of your team’s sites. This flow allows you to wait for DNS propagation to complete before adding this subdomain to your site.
- From your site configuration: If you only have access to a single site or want to add a subdomain directly to a site before the domain is live and then delegate it to Netlify DNS, then you can manage this through your site’s configuration.
Avoid www
as a stand-alone subdomain
We recommend that you do not delegate www
as a stand-alone subdomain. Netlify treats www
subdomains and apex domains as alternates for each other. Attempts to delegate www
as a stand-alone subdomain may lead to inconsistent behavior if one site is using the www
subdomain while another uses the apex domain.
# Delegate a subdomain to Netlify DNS for your team
When you delegate a subdomain to Netlify DNS through your team’s
page, this domain is available to any of your team’s sites.If you haven’t already, check the domain registrar that manages your apex domain to make sure it supports NS records for subdomains. You will need to access this domain registrar to update the NS records for your subdomain later in these steps.
In the Netlify UI, navigate to your team’s
page.Select Add or register a domain.
Enter your subdomain, such as
docs.example.com
, and follow the UI prompts to delegate this subdomain to Netlify DNS.To complete your subdomain delegation setup, copy the NS records for your subdomain from the Netlify UI. Log in to the domain registrar that manages the related apex domain, such as
example.com
, and enter NS records for your subdomain.DNS updates can take up to 24 hours to take effect. On occasion, record changes can take longer than this to propagate. Learn more in our Support Guide on DNS propagation.
Once you are ready to add your subdomain to a specific site, navigate to your team’s
page in the Netlify UI and select your site in the list.Go to
.Select Add a domain and enter the stand-alone subdomain, such as
docs.example.com
, that you already delegated to Netlify DNS in the last steps.Select Verify, then Add subdomain. Now the subdomain that you delegated to Netlify DNS is connected to your site.
# Delegate a subdomain to Netlify DNS through site configuration
When you delegate a subdomain to Netlify DNS through your site configuration, we recommend you add your stand-alone subdomain and then delegate this domain to Netlify DNS.
Check the domain registrar that manages your apex domain to make sure it supports NS records for subdomains. You will need to access this domain registrar to update the NS records for your subdomain later in these steps.
Navigate to your site and go to
.Select Add custom domain.
Enter your stand-alone subdomain, such as
docs.example.com
. This flow assumes that your subdomain stems from an apex domain, such asexample.com
, that is already registered through an external domain registrar.Select Verify, then Add subdomain. Now this subdomain is connected to your site but is not yet delegated to Netlify DNS.
To delegate your subdomain to Netlify DNS, next to your subdomain, use the Options menu to select Set up Netlify DNS.
Follow the UI prompts to delegate your subdomain to Netlify DNS. During this UI flow, you may be asked to select Verify and Add subdomain again.
To complete your subdomain delegation setup, copy the NS records for your subdomain from the Netlify UI. Log in to the domain registrar that manages the related apex domain, such as
example.com
, and enter NS records for your subdomain.These DNS updates can take up to 48 hours to take effect. Learn more in our Support Guide on DNS propagation.
Did you find this doc useful?
Your feedback helps us improve our docs.