Configuring branch subdomain names

Is it possible to setup a single site with two branches, and each has a known domain name?

I want master branch to be:

And staging branch to be something known like:

Traditionally, I have just setup two separate Netlify sites to do this. However, I’m just learning about netlify.toml and used contexts to do a branch deploy of both master and staging – but staging got a generated subdomain.


@paytient, at this time, there is no way to configure branch subdomain names (or site names) in netlify.toml.

For the subdomain name, the name will always be the branch name plus to dashes (–) followed by the usual Netlify subdomain domain name. If you had two branches named “dev” and “staging” for the site, the two branch subdomains would be:


This is automatic and cannot be configured.

If you use our Managed DNS service then “dev” and “staging” subdomains will also be automatically created from the primary custom domain. So, if your primary custom domain is, then the two following subdomains will be created:


However, if your primary subdomain was, then the subdomains would be:


This is again is both automatic and not configurable.

If you are using manual configuration to link a domain to a Netlify site, then additional steps are required to get an SSL certificate working for any custom subdomains. They must still follow the naming rules above and must be manually created like all other manual configuration DNS records.