Subdomain, cloudflare confusion. Help please!

Hi folks,

I am using Cloudflare for DNS management but I want to create a subdomain and point it to a Netlify site.

My subdomain is this:

https://goldendusk.sunnamusk.com/

These are my settings in Cloudflare:

But I get this error:

Not Found - Request ID: 01FKGBDMHK8TB1CSZ1K5JTF2MA

Am I doing something glaringly obvious that isn’t correct?

Thanks,

Ben.

I’m not familiar with Netlify but this seems like an error coming from them. I can imagine that they don’t know what to do when receiving a request for your custom domain. They will actually see your .com subdomain in this case, not the netlify.app one. That’s because what happened at DNS resolution time doesn’t really carry over to the HTTP request. The destination of the HTTP request is an IP address and any information about that netlify.app name has been lost. Ensure that you have configured your .com as a custom domain over at Netlify (if they provide that service).

Just to double-check are you following this?

Have you tried without it proxied?

You are creating the record for the CNAME but it looks like you don’t actually have a subdomain called goldendusk on your origin server.

Hey there,

OK thanks for that, I asked the same question over at Netlify support here :

And they say that it might be an issue with Cloudflare?

Thank you!

Hey @StephanBH,

Yes this is the guide I have used and I have just set it to be without proxy so will check it.

Cheers,

Ben.

@user7049 There are two ways to add a custom domain to Netlify, via CNAME or Apex record. In your case you’re choosing to use a CNAME.

Netlify will assign a Let’s Encrypt certificate by default when linking a custom domain via CNAME. If you’re adding the subdomain via CNAME you’ll need to toggle the Proxy status in Cloudflare DNS to Off and then remove and re-add the custom domain in Netlify after disabling the Proxy status for it to work as expected.

Hey @paramdeo thanks for this but this doensn’t solve it. I tried what you suggest but nothing.

I thought that cloudflare would sort the subdomain for me and I could just use netlify - am I wrong? Thanks!

Hey @StephanBH yeah I tried without proxy and still nothing, I’ve just read over the guide again now and still can not get it to work?!

There is no hostname configured on goldendusk.netlify.app that matches the name you are trying to use (goldendusk.sunnamusk.com).

Essentially, requests are reaching Cloudflare with a hostname of goldendusk.sunnamusk.com. Cloudflare lookup the configured Origin (goldendusk.netlify.app) and ask that server for goldendusk.sunnamusk.com. As you have not configured that hostname on Netlify they return an error. There is nothing in the request made two Netlify to indicate that you want the content currently configured on goldendusk.netlify.app to be returned!

If you are on an Enterprise plan you could use a Host Header Override Page Rule, but even on an Enterprise plan that is not really needed.

The solution is to configure goldendusk.sunnamusk.com as a Custom Domain using Netlifys instructions.

1 Like

Thank you, thank you & thank you. The way you worded the solution is perfect and made me realise my mistake! goldendusk.sunnamusk.com is fully working now so really massive thanks!!!

Have a great week,

Ben :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.