Enable branch subdomains

Hello,

Using Netlify DNS and I’ve enabled branch subdomains. I’ve pushed a staging branch which deployed successfully. I can see the site @ https://staging--yalhi.netlify.com/; however, since I am using a custom domain https://www.yalhi.com, I’d like to view the build in staging.yalhi.com.

Do I need to update the DNS settings manually? If so how?

Thank you,
Omer

Shouldn’t need to do anything other than visit https://staging.yalhi.com - is that not working for you?

Nope, it’s not working for me.
I have dev and staging branches, both not working.

Hi @oyalhi,

Since you are using Netlify to manage your DNS, you’ll just need to create those two subdomains here: Netlify App

That should do the trick!

1 Like

Thank you for the solution!

Hi. I’d like to bump this topic.
I have done the same steps but can’t get branch subdomains to work.

But I don’t get anything under https://demo.giessdenkiez.de
Any idea why?

Hey @fmoronzirfas,
It looks like your SSL cert is for three specific domains as opposed to being for *.giessdenkiez.de and giessdenkiez.de- we usually automatically create the latter (with wildcard) for sites using Netlify DNS. We’re looking into why you have that kind of cert and will get back to you soon!

Ah, the problem is that while it looks like you’re using our DNS in our UI, you actually are not. Checking the name servers here shows that you’re using non-Netlify name servers:

Would it be possible for you to delegate your domain to Netlify at your registrar? Here are our docs for how to do that:

This would make the branch subdomain part a bit simpler.

If you’d rather keep your existing DNS hosting, you’ll want to create DNS records at your DNS host pointing to Netlify, and then delete the DNS zone in the Netlify UI. The branch subdomain part with externally hosted DNS is more manual, but still very possible!

Let us know your preference re: DNS hosting (Netlify’s or not-Netlify’s) and then we can get the branch subdomains sorted out.

To clarify some details:

You don’t have to delegate your domain here to use that feature, it just becomes possible to self serve on this feature if you do.

If you don’t, you’ll:

Hi @fool & @jen

I review our DNS settings and check if we can use Netlify DNS for the site.

To be clear, delegating your DNS to us is not required to use branch subdomains. I’d suggest that you please reade my second link about how to do it WITHOUT migrating DNS:

…as this is easier to configure.

Hi @jen @fool
thank you for your help. WE are running on NetlifyDNS now and the subdomain + SSL cert work now.
One last thing:

Maybe this should go into a new thread (let me know if):
I’m trying now to set a MX record to point back to my domain registrar and hoster but they tell me there is no record pointing at them.

dig giessdenkiez.de MX +short

Gives me nothing. I have a record set like this:

Name mx0.giessdenkiez.de
TTL 3600 seconds
Type MX
Priority 10
Value SOME IP

They confirmed that the settings are right.
Any idea why this does not work?

Hey @fmoronzirfas,
Glad to hear that your DNS and SSL are up and running now!

I checked out the MX record with my colleague @luke and he pointed out that you need the mx0. in order to find the record with dig:

dig mx0.giessdenkiez.de MX +short

We confirmed that it’s both in our database and has propagated, so you should be good to go! Let us know if that’s not the case for you or if we can help with anything else.

Hello @jen and @fool, hope you’re doing well!

I was trying to enable a branch subdomain preprod for my custom domain lume.com.ar (delegated to Netlify DNS) but it doesn’t seem to work as far as I keep getting an ERR_NAME_NOT_RESOLVED when trying to access preprod.lume.com.ar

My deploy context preprod is working great, and Netlify recognised it at once when setting it as branch subdomain. SSL cert also looks good with a wildcard before the domain (*.lume.com.ar), but just in case, I renewed it after adding the subdomain modification.

I don’t know if it takes some time to update in order to see it live, or even if I’m missing something. Do you have any idea what’s going on?

Thanks in advance team!!

Hey its working now, so patience is everything, as always! :leaves:

Nonetheless, I wonder if it was something related to Netlify’s servers sync or maybe my SSL cert that just needed to be renew.

That error was a DNS problem, not SSL, and a bit hard to diagnose in retrospect (once DNS changes, there is no historical record of what it used to be), but I am very glad to hear it resolved so quickly for you, since upon investigation I found it to be optimally configured and working well :slight_smile:

@jen @fool

Thank you for your help. Everything is working fine now.