Branch subdomain for alias

Hello.

We have a web app.
Let’s say it is primary-domain.netlify.com and primary-domain.com.
We also have branch deploys and subdomains like staging.primary-domain.com and acceptance.primary-domain.com.

Now we need to add few aliases for our app. We added alias-domain.com and it points to primary-domain.com so this is correct.

But urls staging.alias-domain.com and acceptance.alias-domain.com are not working.

Could you please help us to configure it correctly?

Does the section on Branch Subdomains in the docs not help?

@gregraven No, there is nothing about branch subdomain for alias.

Hey @m.demydiuk, can you explain what you’re trying to achieve? Do you want staging.alias-domain.com to show what you’ve pushed to staging.primary-domain.com?

Hi @jen , yes, this is exactly what we need. Why?:slight_smile: We provide our product to few customers. Each customer has it’s own domain, but the app is one. So, primary domain is for main version of the app, let’s say product.com. But also we need domains for our partners like partner1.com, partner2.com. And each partner should have its own staging/acceptance subdomain. Because partners don’t know about each other. I hope it makes sense now :slight_smile:

It’d be great if you could send your actual Netlify URL so we can poke around your settings. In the meantime, I’ll share @luke’s guide to setting up branch deploys:

I know you said that your branch deploys are already working, but if you’re trying to redirect, say, staging.alias.com to staging.primary.com and those are branch subdomains instead of actual subdomains, you’ll want to revisit the real URLs of those sites. I believe they are more like staging--alias.netlify.com and staging--primary.netlify.com. I’m not positive that redirects like that will even work, but that’s where I’d start. And once you share you’re URL, that’ll help us further troubleshoot if you run into issues!

Any news?

ALIAS from external.com to subdomain--mynetlify.netlify.app would be useful, but does not seem to work.
Could you please enable this or let me know how to configure this correctly?

Or do I have to configure this with external.com?

Thanks in advance!

By the way:
Why not subdomain.mynetlify.netlify.app in addition to subdomain--mynetlify.netlify.app?

I guess a _redirects file would be the best solution.

Could you share your actual URLs to check @net-user? I think that’s where the previous conversation stopped, so with you adding your voice to it but not providing the exact details we asked the previous person brings us to the same point.

A _redirects file (on the forwarding or external domain delegated to netlify) with the following content does what I want:

/* https://subdomain.domain.com/:splat 301!