Branch deploys not working when _not_ using Netlify DNS

We own the domain, and want to point to

I followed [Support Guide] How to use Netlify’s branch deploy feature without Netlify DNS, and everything seems to be in place, but the last step requires contacting your technical support. I already sent an email 2 days ago via the Contact Form (we’re on the Pro plan), but didn’t receive any response as of now.

The configuration we want is that master will be our production branch - and will be available via, which will be CNAME-ed (on our end) to (this is not in place yet, we want to move to that, but can’t until we verify that staging works - see below).
Next, we want our staging branch to be available via, which is already CNAME-ed to

The site name is brandtotal-webapp-frontend.


We don’t want to transfer the nameservers to point to Netlify’s ones, as we have more stuff on that aren’t related to Netlify at all, and don’t want to mix unrelated stuff. We just want these 2 subdomains to work as described above.

Hi, @bengry. The branch subdomain must be the subdomain of the primary custom domain for this site for this feature to work.

In this case, the primary custom domain is not and this can be confirmed (only with an authorized login) here:

If you add the subdomain of staging under the primary custom domain listed on the page above, we can extend the SSL certificate. If there are other questions or if/when the record has been created for the primary custom domain, please let us know.

Hey @luke. So you suggest I add under “Custom domains”? If so wouldn’t that cause someone going to (or to get to our master branch? (

Or am I missing something?

Just to reiterate - I only want the 2 subdomains - and to redirect to Netlify. If I have something like for example, it should have no connection to Netlify whatsoever.

What I was able to do, is to put in the Custom domains list here:, then set up my “Production branch” to staging (in, but that means that for production (i.e. master branch <-> I’ll need to create a separate Netlify website, using a similar technique. This seems quite cumbersome and means I have to maintain the settings of 2 websites, one of which only builds the production branch, but still…

Hi, @bengry. For the branch subdomain feature, it only works for subdomain under the “primary custom domain” for the site at Netlify.

For this site, you have the primary custom domain set to be So the branch subdomain would need to be If you want the staging branch subdomain to be another name, then you will need to change primary custom domain to match.

There is the workaround you mention. You can make the branch in question the production branch for the same repo but linked to a new site. This will allow you to pick any custom domain you want (because the name is now the production branch name and there are no restrictions to the production branch). This restriction of having the branch subdomain under the primary custom domain only applies for our branch subdomain feature.

If there are other questions, please let us know

Sounds like we’ll have to go with the 2 websites route then if we want to stick with our current naming of the domains ( and However, since they’re both connected to the same git repo, and use the same netlify.toml, part of which includes stuff like reverse proxy to our backend:

from = "/api/*"
to = ""
status = 200
force = true

How can I set it up such that with the same toml I get different redirects based on the branch? Since with deploy contexts I can only go so far, given that 2 I have sites - one which has staging as its production branch and one which has master as its production branch.

For all other stuff I think I can manage with just having the same environment variable set up in the Netlify GUI for each site, such that for example SENTRY_ENVIRONMENT is different in each site, and then the plugin is configured in the toml and “just works” with whatever is in its current site, but I’m not sure I can set up redirects based on that etc.

Easiest thing to do for separate redirects is to have them in a _redirects file, one for each site, either copied in to the repo with a bash script during the build or in each site’s folder structure (depending on how it’s structured)!