Custom subdomain not resolving on branch deploy

  • Netlify site name: valuable-landing-page
  • Custom subdomain: dev.valuable.ringfence.nz

Hi Folks,

I’m using Netlify DNS and branch deploys to deploy a static HTML website.
I’ve got a repo with a main branch and a dev branch, and main is currently deployed no problems (valuable.ringfence.nz).

I want to be able to access my dev branch on the custom dns address above. I’m doing the same for another app and everything is working just fine.

I’ve enabled a deploy context for my dev branch in the Netlify UI, I’ve also enabled the dev subdomain under the branch subdomains area in the Netlify UI.

When I navigate to my root domain, everything is fine and I get the main branch as expected.
When I navigate to the custom domain linked above, I get a message from Firefox that it can’t connect.

Using dnschecker.org, I can see that the root domain is resolving just fine all across the globe,
but the custom subdomain does not resolve.

Can anyone tell me if there is something I’ve missed?

Cheers

Alex

Hi, @AlexanderNZ, this is happening because this domain is not using Netlify DNS:

$ whois ringfence.nz  | grep "ns_name"
ns_name_01: ns2.iwantmyname.net
ns_name_02: ns1.iwantmyname.net
ns_name_03: ns3.iwantmyname.net
ns_name_04: ns4.iwantmyname.net

I recommend trying the external DNS instructions and adding the required records with the existing DNS service:

If this doesn’t work or if there are other questions, please let us know.

Goodness! Thanks for the heads up Luke.

I guess I was a bit confused because I could see a green ‘Netlify DNS’ button in my domain management tab for that site, but sure enough I can see that in the overarching domain config, external DNS is in use.

Thanks for the help :slight_smile:

Hi Luke,

Wondering if you can help me again?
I’ve followed the guide you linked, but now I’m getting a certificate mismatch error.

Following Configure external DNS for a custom domain | Netlify Docs

I’ve set dev.valuable CNAME valuable-landing-page.netlify.app 3600 with my registrar.

Navigating to the website I see a cert error:

Websites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for dev.valuable.ringfence.nz. The certificate is only valid for the following names: *.netlify.com, netlify.com
 
Error code: SSL_ERROR_BAD_CERT_DOMAIN

I’ve requested a new cert be provisioned just in case it’s that. Is there anything else I need to do?

Just as a wee update, I’ve also seen [Support Guide] How to use Netlify’s branch deploy feature without Netlify DNS

about custom subdomains for branch deploys and I’ve configured that too.

So currently I’ve got:
valuable CNAME valuable-landing-page.netlify.app 3600
and
dev.valuable CNAME dev--valuable-landing-page.netlify.app 3600

Configured correctly.

I’ve got a note in my HTTPS panel:
valuable.ringfence.nz doesn't appear to be served by Netlify

That has appeared with these changes. Should I expect that to disappear?

Also I read in the above link that I could ask for SSL certs to be extended to include my dev branch deploy as well. I’d really appreciate it if someone could help me out with that.

I hope that’s everything I need! I’ve already got this exact setup working on another Netlify site but I configured that a couple of years ago. It’s been a journey of rediscovery!

Thanks so much for all your help Luke! I appreciate it!

hey there, we have provisioned an SSL certificate for that subdomain, so you should be good to go!

Just an FYI: that error message (valuable.ringfence.nz doesn't appear to be served by Netlify) is from the last renewal failure and is not current :slight_smile: . That box shows the “latest” error, but if the certificate looks right, it probably wasn’t about the most recent renewal.

Awesome! Thank you so much!