My branch subdomain points to my primary domain

Hi,

I have a site that has been working fine for some weeks, I have recently tried to migrate my DNS from GoDaddy to Netlify DNS to benefit from branch deploys.
I know I could have done it keeping goDaddy, but prefer to be 100% on netlify.

The issue is that now my branch subdomains are created but their alias points to the primary domain and I need to go to the deploy preview URL to really see the change and test it.

My netlify site name is: startuponsale.netlify.app
and my custom domain is startuponsale.com

I have migrated all the DNS records into Netlify and waited for 48h, done the DIG and WHOIS and they look fine.

What am I missing?

Ideally I would like to have: staging.startuponsale.com, where I want to test a release before going live and integrate it with other staging parts of the webapp.

Thanks.

Hi @mustainer

To clarify, a branch subdomain is only mapped to a branch of the same name (see documentation.) So the deployed branch is called staging?

Once the branch is deployed the subdomain is configured on the custom domains page of the Netlify UI as per this example:

Under https://app.netlify.com/teams/YOUR_TEAM/dns/startuponsale.com you should then see the subdomain with a NETLIFY record e.g.

Are these the steps you have taken/configuration you can see?

Hi @coelmay,

thanks for your answer, yes I think everything is well setup.

My branch is called staging, the branch domain is setup and appears as in your picture.
But when I do a deploy on the branch this is the result:

- Preview url: https://61dd45ccc3aea40007adbcb8--hopeful-wilson-8d1eec.netlify.app/login
- Staging subdomain: https://staging--hopeful-wilson-8d1eec.netlify.app/login

… where I expected the new branch to be available: staging.marketplace.startuponsale.com

I cannot attach media files in an answer, my branch subdomain is registered (similar to your image):

and DNS is pointing to:

Name. staging.marketplace.startuponsale.com
TTL. 3600 seconds
Type. NETLIFY
Value. hopeful-wilson-8d1eec.netlify.app

You originally mentioned the domain was staging.startuponsale.com but now you mention staging.marketplace.startuponsale.com.

What I see at staging.marketplace.startuponsale.com is the same as what I see at marketplace.startuponsale.com which appears the same as that seen at staging--hopeful-wilson-8d1eec.netlify.app

As for staging.startuponsale.com this appears the same as what is seen at startuponsale.com.

My fault, I have now added a (Staging) text to differentiate better, seems to be working fine.

Sorry the inconveniences.

1 Like

Glad everything is working now, @mustainer! Thanks for the great explanations, @coelmay :netliconfetti: