Wildcard Subdomain Slow access

I have deployed my app on an Ubuntu machine and bought a domain from Name . com. I am using Cloudflare for SSL. When I go to Cloudflare Zero Trust Access → Access → Tunnels → Public Host and add some subdomains like abc . example . com, it works fine. However, when I add a wildcard subdomain like * . example . com, it does not work.

As a newcomer to this technology, I would appreciate some guidance on how to resolve this issue.

One solution that someone suggested was to manually add * to the DNS record and in the tunnel public host. While this does work, it has made the website very slow. When I remove the wildcard, it starts working at the same good speed again.

Can someone suggest a better solution for this problem? Thank you.

Hi Abdullah,

Please try the following steps in order to resolve the slow wildcard subdomain issue:

  • Ensure your DNS record is correctly configured with the wildcard subdomain.
  • Optimize your website’s performance (minify CSS/JS, use caching, optimize images, etc.).
  • If needed, consider upgrading your Cloudflare plan to receive faster support and priority features.

Remember that adding a wildcard can affect performance as it serves multiple subdomains, but by optimizing your site and ensuring proper configuration, you can minimize the impact on speed.

I understand but when I remove the wildcard it works smoothly as expected. So I’m thinking there is some issue with the configuration.
Can you tell me if manually add * to the DNS record and in the tunnel public host is enough to enable the wildcard domain?