wildcard cname to pages/workers
Hi,
I'm trying to set up a wildcard CNAME for my Cloudflare Pages app so that tenant.app.com works for any tenant name. I’ve already added app.name.com as a custom domain in Cloudflare.
I tried creating a *.name.com CNAME pointing to both app.name.com and the pages.dev domain, but neither worked.
When I point * to the pages.dev domain, I get a Cloudflare error saying the host is offline (even though Cloudflare and my browser are online).
When I point * to app.name.com, which is already mapped to the Pages domain, I get a DNS_PROBE_FINISHED_NXDOMAIN error.
Can someone help me figure out how to correctly set up a wildcard subdomain for my Cloudflare Pages app?
2 Replies
https://developers.cloudflare.com/dns/manage-dns-records/reference/wildcard-dns-records/
Warning If your project is on Cloudflare Pages, note that wildcard custom domains are not supported. Refer to known issues for details.
Cloudflare Docs
Wildcard DNS records
Normal DNS records map a domain name to one or multiple IP addresses or other associated resources to a specific domain name (a one-to-many mapping). Wildcard DNS records allow you to have a many-to-many mapping, for example if you had hundreds or thousands of subdomains you wanted to point to the same resources.
Ah I would like this for pages. Are there any workarounds?
I saw something about Cloudflare snippets in the future in a post from a while back
But can't find more info