CloudFlare DNS settings for Wildcard Subdomain + SSL Support
The Cloudflare Integration enables automated DNS management for your SaaS tenants using wildcard subdomains (e.g., *.yourcrm.com
). This setup simplifies tenant provisioning by eliminating the need to manually configure DNS records for every new tenant.
π Why Use Wildcard Subdomains with Cloudflare?
Wildcard subdomains allow all tenants (e.g., client1.yourcrm.com
, client2.yourcrm.com
) to be routed through a single DNS rule. With Cloudflare, you can leverage this feature to:
Reduce DNS configuration time.
Eliminate the need to manually add A or CNAME records per tenant.
Ensure fast, secure, and automated DNS propagation.
π§ Prerequisites
Before using Cloudflare integration, make sure you have:
A verified Cloudflare account.
Your domain (e.g.,
yourcrm.com
) added and pointing to Cloudflareβs nameservers.A Cloudflare API token or Global API Key with permission to manage DNS records.
A wildcard subdomain (
*.yourcrm.com
) DNS record set up in your Cloudflare dashboard.
βοΈ How It Works
When Cloudflare integration is enabled and a wildcard subdomain is configured:
The SaaS system assigns subdomains to tenants (e.g.,
tenant1.yourcrm.com
,tenant2.yourcrm.com
).The wildcard DNS record (
*.yourcrm.com
) already covers all such subdomains.No additional DNS record needs to be added for each tenant.
Tenants can instantly access their subdomain upon successful provisioning.
π Recommended DNS Setup on Cloudflare
Go to your domain in the Cloudflare Dashboard.
Navigate to the DNS tab.
Add the following A Record:
(Optional) Add an A Record for the root domain as well (
@
β IP).
This configuration ensures that any subdomain like client1.yourcrm.com
automatically routes to your server.
π§ Best Practices
Use SSL/TLS Full or Full (Strict) in Cloudflare for encrypted connections to your server.
Pair with CPanel Integration setup for fully automated provisioning.
Set proper Page Rules or Firewall Rules if tenants are to be isolated or monitored.
β οΈ Troubleshooting Tips
Ensure your server is configured to handle requests for wildcard subdomains (e.g., via Apache VirtualHost or NGINX server block with
server_name *.yourcrm.com
).Check propagation delays when testing new subdomains.
Confirm DNS settings are proxied through Cloudflare if you want caching and protection benefits.
Last updated