You can find the domains associated with your site in the Domain management section of your site settings.
You can assign multiple custom domains to the same site. When you do this, one is designated as the primary domain, and all others are called domain aliases.
You can add a domain alias in your site settings under Domain management > Domains > Custom domains. Select Add domain alias, and follow the process for assigning a domain to your site.
To change a domain alias to the primary domain, select the Options button next to the domain, then select Set as primary domain.
If you have multiple domains assigned to your site, you can redirect visitors between them or add other custom redirect and rewrite rules based on the domain entered into the browser by your visitors.
For more information, visit the docs on domain-level redirects.
Apex domains and
When you assign an apex domain (eg.
petsofnetlify.com) or a
www subdomain (eg.
www.petsofnetlify.com) as the primary domain for your site, two entries are added to the Custom domains panel:
- one entry for the apex domain, and
- one entry for the
The primary domain is the custom domain you entered. The other entry is for the alternative domain that gets redirected automatically to the primary domain.
- If you set the
wwwsubdomain as your primary domain, Netlify will automatically redirect the apex domain to the
- If you set the apex domain as your primary domain, Netlify will automatically redirect the
wwwsubdomain to the apex domain.
Unless your DNS provider supports CNAME flattening, ANAME or ALIAS records for apex domains, we strongly recommend setting the
www subdomain (or another subdomain) as your primary domain. Our blog post How to Set Up Netlify DNS has more details on why we recommend that configuration.
Redirects for non-
Though Netlify automatically redirects between the apex domain and
www subdomain, we don't do this for any other subdomains. You can configure this behavior yourself with domain-level redirects.
This feature is available in our UI with Netlify DNS.
Netlify DNS can automatically turn your deployed branches into their own subdomains.
For example, if you have branch deploys enabled for a branch named
staging, and your site’s custom domain is
example.com, you can view the latest deploy of that branch at
staging.example.com. To do this, go to your site settings under Domain management > Domains > Branch subdomains, and select New subdomain.
A branch subdomain can be deleted by clicking the
x button in the corresponding subdomain row.
Visit our Community forum for guidance on setting up branch subdomains without Netlify DNS.
Did you find this doc useful?
Your feedback helps us improve our docs.