Broken link from Cloudflare to Netlify

Hello all,

I feel like I’ve fallen at the last hurdle and I can’t find a solution.

My goal:
I’d like to use my purchased domain with Cloudflare that then points to my Netlify default subdomain.

Here is my status:

  • I’ve purchaced a domain from Namecheap.com.
  • I’ve added the site to Cloudflare and copied the CF nameservers to my domain on Namecheap.
  • I’ve then added two DNS records to CF: CNAME, @ and www, ***.netlify.app, DNS only, auto.

If I target my domain now I get a site not found 404 broken link error ID 01HW7PXKB9NKQA7BJM5H847K4J.

Do I need to do anything special on Netlify? I’ve just targeted the autogenerated subdomain that works fine if I target that directly.

You need to assign your domain to your Netlify site.

Ok. I think this is where a bit of ignorace on my part is evident. Why would I need to add my custom domain to Netlify if I’m pointing to my Netlify subdomain from Cloudflare?

Because you need to tell Netlify to listen for requests to that hostname and to serve your site.

Looking at your screenshot again, I suggest you have not correctly configured DNS records. The apex domain shouldn’t have a CNAME record with your Netlify subdomain as the value. It should have an A record with the Netlify load balancer IP or a flattened CNAME with the Netlify load balancer domain.