Auto Deploy to Branch Sub Domain

I have set up netlify with a custom domain - so far so good - but I was wondering is it possible to automatically do a Branch deploy to a custom domain?

Currently if I push a branch to my repository, the branch is deployed at https://<GIT_HASH> Is it possible for the branch to automatically be deployed to https://<BRANCH_NAME> Currently I have to go to the domain management in the settings and manually add it, which I would like to avoid.

Many thanks.

The last successful build of your branch (usually that corresponds with your last commit on that branch) will be automatically served at branchname.yourcustomdomain with no further action by you; we serve as soon as it is built. The only challenges are 2:

  1. in the SSL certificate. If you already have an SSL certificate (which you do for *, see here: then this is not a blocker.
  2. then you just need to add the DNS records, which you could do in advance (add every branch name preemptively here:, or you could set some “default” * record as a CNAME pointing to and then automatically, will map to the right place and “just work”

You could avoid even that


Thanks for your help.

I added the * CNAME record as you suggested and I am now able to access my deployed branches by their names, without having to do any extra steps in the UI, which is great.

The only thing is that the Preview deploy link on the builds page still links to the url on the netlify subdomain Is there any way to change that or is that the kind of thing I should be making a feature request for?


Thanks for your help. I followed your suggestion of adding a CNAME with a wildcard and it does miraculously “just work” so thank you :slight_smile: