Site domain customization just got more flexible on Netlify — you can now set a custom domain for Deploy Previews and branch deploys, and we’ll automatically create context-based subdomains for you!
You can set up these custom domains under Site Settings > Domain Management > Automatic deploy subdomains and is now available for everyone.
- Your team is on a Pro plan or above.
- The custom domain or subdomain must be managed by Netlify DNS.
How can I use automatic deploy subdomains?
Deploy Previews work by deploying pull/merge requests to a unique URL different from the one your production site uses. Without any configuration, the default Deploy Preview URLs look like
deploy-preview-123--sitename.netlify.app where your site’s name is
sitename and the number is a PR/merge identifier.
Deploy previews are great for your cross-functional team to preview and collaborate on changes before they go live. Allowing your team to specify your own domain or subdomain for deploy previews and branches (instead of the default
*.netlify.app) empowers you to integrate better and keep your site’s URLs consistent with your workflow’s requirements! Example areas that can benefit from using your own (sub)domain are:
- Security: authentication flows
- Productivity: integration with 3rd-party workflows
- Branding: keeping consistency for ease of use and trust
If you set up automatic deploy subdomains for deploy previews with
yourcompany.com, then URLs will look like
deploy-preview-123.yourcompany.com, or when using a subdomain
dev.yourcompany.com then the URLs will be
For Branch deploys we have already offered setting up branch subdomains using the site’s
primary domain. For example if your site was configured with a primary domain
yourcompany.com and a branch
feature-123, you could set up a branch subdomain
With automatic custom subdomains, you have more options than branch subdomains offer since you can use a different custom domain than your site’s primary domain and even using a subdomains. Automatic custom subdomains also apply to all branch deploys for your site.
For example having a site with a primary URL
yourcompany.com and automatic deploy subdomain for branches set up for the subdomain
branches.yourcompany.com , then a branch
new-feature would be at
new-feature.branches.yourcompany.com. Alternatively you could use a different domain than the site’s primary domain e.g.
Let us know what you think!
We hope that this update will empower your team and enable and boost your productivity workflows. You can learn more in our documentation or blog post.
Please let us know what you think here in the forums or in this short survey!