# 404 Not Found error when accessing branch via CNAME

**URL:** <https://answers.netlify.com/t/404-not-found-error-when-accessing-branch-via-cname/8333>\
**Category:** Support\
**Tags:** netlify-dns-https-ssl\
**Created:** [February 3, 2020, 10:22am UTC](https://answers.netlify.com/t/404-not-found-error-when-accessing-branch-via-cname/8333 "2020-02-03T10:22:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![icgbot](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@icgbot](https://answers.netlify.com/u/icgbot)\
**Post date:** [February 3, 2020, 10:22am UTC](https://answers.netlify.com/t/404-not-found-error-when-accessing-branch-via-cname/8333/1 "2020-02-03T10:22:58Z")

</div>

Hi,  
I recently built my first Netlify app and successfully set up everything, including point my custom domain to the Netlify site with SSL ([https://projection-path-explorer.caleydoapp.org](https://projection-path-explorer.caleydoapp.org)).  
I followed the instructions on “[How to use Netlify’s branch deploy feature without Netlify DNS](https://answers.netlify.com/t/common-issue-how-to-use-netlify-s-branch-deploy-feature-without-netlify-dns/128)” to setup a subdomain with SSL as well, but when accessing the deployed branch via my own domain I get an 404 error from Netlify:  
[http://projection-path-explorer-daily.caleydoapp.org/](http://projection-path-explorer-daily.caleydoapp.org/) (note the `-daily` suffix in the subdomain).

It works if i use “[develop.projection-path-explorer.netlify.com](http://develop.projection-path-explorer.netlify.com)” as CNAME instead of “[develop--projection-path-explorer.netlify.com](http://develop--projection-path-explorer.netlify.com)” though, as with [develop.projection-path-explorer.caleydoapp.org](http://develop.projection-path-explorer.caleydoapp.org).  
Did i set something wrong on Netlify here, or does it make any difference for you when issueing SSL certificates if i use the sub-domain instead of `branchname--*`?

Thank you and best regards,  
Klaus

---

<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:** [February 4, 2020, 1:12am UTC](https://answers.netlify.com/t/404-not-found-error-when-accessing-branch-via-cname/8333/2 "2020-02-04T01:12:17Z")

</div>

You don’t use our DNS hosting, but you have it configured. This will cause problems. If you’d like to remove that setting, here:

> **[Netlify App](https://app.netlify.com/teams/icgbot/dns/caleydoapp.org#delete-dns-zone)**
>
> Start building the best web experiences in record time

…and let us know, then we’ll be better able to understand what is happening without that confounding factor in place.

---

<div class="post-metadata">

**Author:** ![icgbot](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@icgbot](https://answers.netlify.com/u/icgbot)\
**Post date:** [February 6, 2020, 8:38am UTC](https://answers.netlify.com/t/404-not-found-error-when-accessing-branch-via-cname/8333/3 "2020-02-06T08:38:54Z")

</div>

Thanks! I deleted the DNS zone but the problem I’ve described above is still the same.

---

<div class="post-metadata">

**Author:** ![Dennis](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/dennis/32/34_2.png) [@Dennis](https://answers.netlify.com/u/Dennis)\
**Post date:** [February 10, 2020, 5:53pm UTC](https://answers.netlify.com/t/404-not-found-error-when-accessing-branch-via-cname/8333/4 "2020-02-10T17:53:09Z")

</div>

Now that you’ve removed the DNS zone, you’ll also need to change the CNAME to point back to `develop--projection-path-explorer.netlify.com`. Once you do that, please let us know and we can make sure that branch subdomain gets added to your site’s certificate.

---

<div class="post-metadata">

**Author:** ![icgbot](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@icgbot](https://answers.netlify.com/u/icgbot)\
**Post date:** [February 11, 2020, 8:34am UTC](https://answers.netlify.com/t/404-not-found-error-when-accessing-branch-via-cname/8333/5 "2020-02-11T08:34:05Z")

</div>

I already did that:

```auto
> nslookup.exe projection-path-explorer-daily.caleydoapp.org
Server: alijku01.edvz.uni-linz.ac.at
Address: 140.78.2.62

Non-authoritative answer:
Name: develop--projection-path-explorer.netlify.com
Addresses: 2a03:b0c0:3:d0::d24:5001
          134.209.226.211
Aliases: projection-path-explorer-daily.caleydoapp.org

```

But now i have the same `Not found` error that I had with the first route.

---

<div class="post-metadata">

**Author:** ![Dennis](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/dennis/32/34_2.png) [@Dennis](https://answers.netlify.com/u/Dennis)\
**Post date:** [February 11, 2020, 10:20am UTC](https://answers.netlify.com/t/404-not-found-error-when-accessing-branch-via-cname/8333/6 "2020-02-11T10:20:39Z")

</div>

I think we need to take a step back. What I mean is:

- [projection-path-explorer-daily.caleydoapp.org](http://projection-path-explorer-daily.caleydoapp.org) needs to have a CNAME pointing to [projection-path-explorer.netlify.com](http://projection-path-explorer.netlify.com)
- [develop.projection-path-explorer-daily.caleydoapp.org](http://develop.projection-path-explorer-daily.caleydoapp.org) (branch subdomain) needs to have a CNAME pointing to [develop--projection-path-explorer.netlify.com](http://develop--projection-path-explorer.netlify.com)

That said, you can only access a branch via a subdomain of the same name. To access your `develop` branch deploy, you need to set a CNAME for your custom domain’s `develop` subdomain (as described above). This is a requirement for “branch subdomains”.

---

<div class="post-metadata">

**Author:** ![icgbot](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@icgbot](https://answers.netlify.com/u/icgbot)\
**Post date:** [February 11, 2020, 11:26am UTC](https://answers.netlify.com/t/404-not-found-error-when-accessing-branch-via-cname/8333/7 "2020-02-11T11:26:13Z")

</div>

> [@Dennis](#):
>
> That said, you can only access a branch via a subdomain of the same name. To access your `develop` branch deploy, you need to set a CNAME for your custom domain’s `develop` subdomain (as described above). This is a requirement for “branch subdomains”.

Oh that makes sense! I didn’t get that and thought i can set an arbitrary CNAME for the develop branch.  
The two domains are set up as you described:

```auto
> nslookup develop.projection-path-explorer.caleydoapp.org
Server: UnKnown
Address: 192.168.0.1

Nicht autorisierende Antwort:
Name: develop--projection-path-explorer.netlify.com
Addresses: 2a03:b0c0:3:e0::298:6001
          157.230.103.136
Aliases: develop.projection-path-explorer.caleydoapp.org

```

```auto
> nslookup projection-path-explorer.caleydoapp.org
Server: UnKnown
Address: 192.168.0.1

Nicht autorisierende Antwort:
Name: projection-path-explorer.netlify.com
Addresses: 2a03:b0c0:3:d0::d19:7001
          157.230.120.63
Aliases: projection-path-explorer.caleydoapp.org

```

Thanks for your help and patience! 🙂

---

<div class="post-metadata">

**Author:** ![Dennis](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/dennis/32/34_2.png) [@Dennis](https://answers.netlify.com/u/Dennis)\
**Post date:** [February 11, 2020, 2:22pm UTC](https://answers.netlify.com/t/404-not-found-error-when-accessing-branch-via-cname/8333/8 "2020-02-11T14:22:28Z")

</div>

Hi, got your branch subdomain added to your certificate. Let me know if you have any other questions! 🙂
