# Enable branch subdomains

**URL:** <https://answers.netlify.com/t/enable-branch-subdomains/5218>\
**Category:** Support\
**Tags:** branch-deploys, redirects\
**Created:** [November 18, 2019, 12:19am UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218 "2019-11-18T00:19:52Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![oyalhi](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/oyalhi/32/4200_2.png) [@oyalhi](https://answers.netlify.com/u/oyalhi)\
**Post date:** [November 18, 2019, 12:19am UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/1 "2019-11-18T00:19:52Z")

</div>

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/](https://staging--yalhi.netlify.com/); however, since I am using a custom domain [https://www.yalhi.com](https://www.yalhi.com), I’d like to view the build in [staging.yalhi.com](http://staging.yalhi.com).

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

Thank you,  
Omer

---

<div class="post-metadata">

**Author:** ![fool](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fool/32/37_2.png) [@fool](https://answers.netlify.com/u/fool)\
**Post date:** [November 18, 2019, 7:17pm UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/2 "2019-11-18T19:17:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![oyalhi](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/oyalhi/32/4200_2.png) [@oyalhi](https://answers.netlify.com/u/oyalhi)\
**Post date:** [November 18, 2019, 7:59pm UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/3 "2019-11-18T19:59:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![laura](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/laura/32/6274_2.png) [@laura](https://answers.netlify.com/u/laura)\
**Post date:** [November 18, 2019, 10:01pm UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/4 "2019-11-18T22:01:30Z")

</div>

Hi @oyalhi,

Since you are using Netlify to manage your DNS, you’ll just need to create those two subdomains here: [Netlify App](https://app.netlify.com/sites/yalhi/settings/domain#branch-subdomains)

That should do the trick!

---

<div class="post-metadata">

**Author:** ![oyalhi](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/oyalhi/32/4200_2.png) [@oyalhi](https://answers.netlify.com/u/oyalhi)\
**Post date:** [November 18, 2019, 10:19pm UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/5 "2019-11-18T22:19:12Z")

</div>

Thank you for the solution!

---

<div class="post-metadata">

**Author:** ![fmoronzirfas](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fmoronzirfas/32/14240_2.png) [@fmoronzirfas](https://answers.netlify.com/u/fmoronzirfas)\
**Post date:** [August 5, 2020, 10:25am UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/6 "2020-08-05T10:25:46Z")

</div>

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

- My project is “internetoftrees” in the team “technologiestiftung”
- connected to GitHub repo [GitHub - technologiestiftung/giessdenkiez-de: The consequences of climate change, especially the dry and hot summers, are putting a strain on Berlin's ecosystem. Our urban trees are drying out and suffering long-term damage. Gieß den Kiez is made to enable coordinated citizen participation in the irrigation of urban trees.](https://github.com/technologiestiftung/giessdenkiez-de)
- We are using NetlifyDNS
- The primary domain is [www.giessdenkiez.de](http://www.giessdenkiez.de)
- I enabled branch deploys for the branches “demo” and “staging”
- They deployed fine on demo–internetoftrees.netlify.app
- I added a branch subdomain called demo under [Netlify App](https://app.netlify.com/sites/internetoftrees/settings/domain#branch-subdomains)

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

---

<div class="post-metadata">

**Author:** ![jen](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jen/32/6044_2.png) [@jen](https://answers.netlify.com/u/jen)\
**Post date:** [August 7, 2020, 8:35pm UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/7 "2020-08-07T20:35:53Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![jen](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jen/32/6044_2.png) [@jen](https://answers.netlify.com/u/jen)\
**Post date:** [August 7, 2020, 8:58pm UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/9 "2020-08-07T20:58:41Z")

</div>

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:

> **[DNS Checker - DNS Check Propagation Tool](https://dnschecker.org/#NS/giessdenkiez.de)**
>
> Check DNS Propagation worldwide. DNS Checker provides name server propagation check instantly. Changed nameservers so do a DNS lookup and check if DNS and nameservers have propagated.

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

> **[Delegate your domain to Netlify](https://docs.netlify.com/domains-https/netlify-dns/delegate-to-netlify/)**
>
> Take advantage of our managed DNS service by delegating your domain that’s registered with an external provider. Update name servers on your registrar.

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.

---

<div class="post-metadata">

**Author:** ![fool](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fool/32/37_2.png) [@fool](https://answers.netlify.com/u/fool)\
**Post date:** [August 7, 2020, 10:33pm UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/10 "2020-08-07T22:33:47Z")

</div>

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:

- delete the DNS Zone (which you are not currently using) here: [Netlify App](https://app.netlify.com/teams/technologiestiftung/dns/giessdenkiez.de#delete-dns-zone)
- and you’ll follow this process to get branch subdomains created: [[Support Guide] How to use Netlify’s branch deploy feature without Netlify DNS](https://answers.netlify.com/t/support-guide-how-to-use-netlify-s-branch-deploy-feature-without-netlify-dns/128)

---

<div class="post-metadata">

**Author:** ![fmoronzirfas](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fmoronzirfas/32/14240_2.png) [@fmoronzirfas](https://answers.netlify.com/u/fmoronzirfas)\
**Post date:** [August 10, 2020, 8:46am UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/11 "2020-08-10T08:46:04Z")

</div>

Hi @fool & @jen

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

---

<div class="post-metadata">

**Author:** ![fool](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fool/32/37_2.png) [@fool](https://answers.netlify.com/u/fool)\
**Post date:** [August 10, 2020, 2:34pm UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/12 "2020-08-10T14:34:22Z")

</div>

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:

> [@\[Support Guide\] How to use Netlify’s branch deploy feature without Netlify DNS](https://answers.netlify.com/t/support-guide-how-to-use-netlify-s-branch-deploy-feature-without-netlify-dns/128):
>
> Last reviewed by Netlify Support Staff: August 2023 So - you’ve discovered the concept of [branch subdomains](https://docs.netlify.com/domains-https/custom-domains/multiple-domains/#branch-subdomains) and want to use them! But you can’t use Netlify’s [DNS Hosting](https://docs.netlify.com/domains-https/netlify-dns/)? Never fear, there is a way to do this and this post will explain how in detail! Please note, however, that going this route means missing out on single click setup and all the goodness it includes - for example, getting an SSL certificate configured automatically. We also have [Automatic Deploy Subdomains](https://docs.netlify.com/netlify-labs/experimental-features/automatic-deploy-subdomains/), which allows users …

…as this is easier to configure.

---

<div class="post-metadata">

**Author:** ![fmoronzirfas](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fmoronzirfas/32/14240_2.png) [@fmoronzirfas](https://answers.netlify.com/u/fmoronzirfas)\
**Post date:** [August 20, 2020, 4:24am UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/13 "2020-08-20T04:24:06Z")

</div>

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.

```bash
dig giessdenkiez.de MX +short

```

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

```nohighlight
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?

---

<div class="post-metadata">

**Author:** ![jen](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jen/32/6044_2.png) [@jen](https://answers.netlify.com/u/jen)\
**Post date:** [August 21, 2020, 12:34am UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/14 "2020-08-21T00:34:12Z")

</div>

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![dprietoc](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/dprietoc/32/15217_2.png) [@dprietoc](https://answers.netlify.com/u/dprietoc)\
**Post date:** [August 29, 2020, 11:50pm UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/15 "2020-08-29T23:50:26Z")

</div>

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!!

---

<div class="post-metadata">

**Author:** ![dprietoc](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/dprietoc/32/15217_2.png) [@dprietoc](https://answers.netlify.com/u/dprietoc)\
**Post date:** [August 30, 2020, 12:19am UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/16 "2020-08-30T00:19:31Z")

</div>

Hey its working now, so **patience is everything, as always!** 🍃

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

---

<div class="post-metadata">

**Author:** ![fool](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fool/32/37_2.png) [@fool](https://answers.netlify.com/u/fool)\
**Post date:** [August 30, 2020, 6:10pm UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/17 "2020-08-30T18:10:07Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![fmoronzirfas](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fmoronzirfas/32/14240_2.png) [@fmoronzirfas](https://answers.netlify.com/u/fmoronzirfas)\
**Post date:** [September 1, 2020, 6:52am UTC](https://answers.netlify.com/t/enable-branch-subdomains/5218/18 "2020-09-01T06:52:27Z")

</div>

@jen @fool

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