@paytient, at this time, there is no way to configure branch subdomain names (or site names) in netlify.toml.
netlify.com 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
example.netlify.com, 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
example.com, then the two following subdomains will be created:
However, if your primary subdomain was
www.example.com, 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.