Wildcard custom domain alternative for Pages

Hi there,

I have a website that relies on subdomains in URLs like {tenant}.example.com
My website is served in Cloudflare Pages with custom domain example.com and it works.

However I cannot find a way to point {tenant}.example.com to example. I made sure that the wildcard DNS points to my Pages website.

When I connect to some-tenant.example.com it returns a Cloudflare page with “Connection timed out”.

I have tried to add a function to Pages at /functions/[[endpoint]].js that transforms {tenant}.example.com to example.com however it still returns a “Connection timed out”.

Is there a way for Cloudflare to support wildcard custom domain with Pages?

Thanks !

Hey,

Wildcard support is planned. For now, though, you can manually add as a Custom Domain. BIZ/ENT can have up to 500 custom domains today.

Thank you for your quick reply. How about the free plan? Do you have an ETA for the feature?
Can I create these custom domain with API?

Free plan has 100 per project: Limits · Cloudflare Pages docs

No ETA

Yep: Cloudflare API Documentation

I appreciate. Thank you.

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