Home
Support Forums

CNAME record to a branch deployment url doesn't work

Hello,

I’m trying to create a CNAME record to point a subdomain of our custom domain to a branch deployment url like this:
test.customdomain.com → test–customdomain.netlify.app.

The custom domain is registered on Netlify and i’m using the Netlify DNS settings page to do this so i think it should work, but it doesn’t. When i go to test.customdomain.com it points me to a Not found page instead of the branch deployment.

The branch deployments are done by an Azure devops pipeline using the CLI command npx netlify deploy --alias test ... if that matters.

How can i make this work? Is it even possible?

Hi, @Rens. The --alias option does not create a branch deploy. The --alias option is intended to be used to get a predictable URL for a single deploy. Reusing the same string for --alias across multiple deploys will not result in branch deploys.

The only way to use the branch deploy features is to do a build and deploy at Netlify. There is an open feature request to make it possible to use the branch deploy workflow with the Netlify CLI tool but it isn’t possible at this time.

If there are other questions about this, please let us know.

Edit: I’ve cross-linked this forum topic with the feature request. If this feature becomes available, we will post an update here to let you know about it.