🔧 b) Configuring DNS Records needed
🌐 Configuring Wildcard A Records
To properly support tenant subdomains (e.g. client1.yourdomain.com
, client2.yourdomain.com
, etc.) in your SaaS Module for Perfex CRM, you’ll need to configure a wildcard A record in your DNS settings. This record ensures that any subdomain under your main domain points to your server and loads the correct tenant workspace.
✅ What is a Wildcard A Record?
A wildcard A record allows all subdomains of a domain to resolve to a single IP address—without needing to create each subdomain manually. Instead of configuring:
client1.yourdomain.com → 123.123.123.123
client2.yourdomain.com → 123.123.123.123
client3.yourdomain.com → 123.123.123.123
You simply add:
*.yourdomain.com → 123.123.123.123
This is essential for SaaS platforms that dynamically generate subdomains for each customer (tenant).
☁️ Using Cloudflare
Cloudflare is one of the most popular DNS management providers and works perfectly with wildcard A records.
🔧 Steps to Add a Wildcard A Record in Cloudflare:
- Log in to your Cloudflare Dashboard.
- Select your domain from the list.
- Go to the DNS tab.
- Click “Add Record”.
- Set the following values:
- Type: A
- Name:
*
- IPv4 Address: Your server IP (e.g.,
123.123.123.123
) - Proxy status: DNS only (⚠️ Important: Must be gray-clouded for wildcard subdomains to work properly)
- Click Save.
⚠️ Important: Cloudflare does not support wildcard subdomains over their proxy (orange-clouded) unless they are pre-defined. That’s why you must select “DNS Only” (gray-cloud) when setting up the wildcard record.
🧩 Using Other DNS Providers (GoDaddy, Namecheap, etc. including all Control Panels)
If you’re not using Cloudflare, the process is similar. Here’s a general guide:
- Log in to your DNS provider’s dashboard.
- Navigate to your domain’s DNS Management or Zone Editor.
- Add a new A Record with the following values:
- Host / Name:
*
- Type: A
- Value / Points to: Your server IP address
- TTL: Auto or 30 minutes
- Host / Name:
- Save changes.
Each provider may label things slightly differently, but the concept is the same. Once the wildcard A record is in place, all subdomains will resolve to your server.
🔍 How to Verify
After updating your DNS:
- Open a terminal or command prompt.
- Run:
ping randomsubdomain.yourdomain.com
If it returns your server’s IP, the wildcard DNS record is working as expected.
💡 Pro Tip: Pairing with Wildcard SSL
If your SaaS module is running over HTTPS, make sure you’re also using a Wildcard SSL Certificate (e.g., from Let’s Encrypt or a paid provider). This ensures that all tenant subdomains are covered under the same certificate.