Inactive (Error) message when setting custom domain on Pages site

Hi,

I’m having a problem setting a custom domain for my Cloudflare Pages site. I want my Pages site to be accessible on a sub-subdomain of my domain (e.g. dev.service-name.example.com), and I’ve set the CNAME record in my domain registrar’s DNS settings accordingly. However, when I click the “Check DNS Records” button in the Cloudflare dashboard, I get a message stating “Inactive (Error).” I’ve verified that the CNAME record is set correctly for the domain using dig. Would anyone be able to help with this?

Thanks!

After some digging, noticing that Cloudflare Pages sites use Let’s Encrypt, and checking with https://letsdebug.net, I found that the issue appears to be that Cloudflare’s SSL does not support second-level subdomains (e.g. dev.service-name.example.com) without a paid add-on.

As a workaround, I used a dash instead, so my Pages site is now located at something like dev-service-name.example.com. Not ideal, but it will work.

Would be nice if this were mentioned in the documentation, as the error message was not clear at all. Even better: mention this if the user were to attempt to link a second-level subdomain to their Pages site.