I see that Wildcard domains aren’t supported in the docs but that can’t actually be the case. There must be someway to do wildcards subdomains for Workers? Is it just an Enterprise feature? If you truly can’t, please share the technical limitation that is preventing Cloudflare from supporting this feature.
You can do Wildcard Workers using HTTP Routes, just add a wildcard route (
*.example.com/* or even
*/* to even match the root), and then a wildcard DNS Record (
Proxied). Just be warned, when you add a wildcard route like that, you’ll need to create another route (from within the zone/domain → HTTP routes) for every subdomain you want the worker to not run on, by creating another route with service none (
You can’t do it with Custom Domains though, just routes.
If you want to do a subdomain deeper then one level, like
*.images.example.com, you’d need to buy Advanced Certificate Manager (ACM) and manually issue a wildcard certificate to cover those, the default Universal cert you get for free wouldn’t.