cPanel DNS settings for Wildcard Subdomain + SSL Support

The cPanel 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.


✅ Prerequisites

Ensure the following before proceeding:

  • Your domain (e.g., yourcrm.com) is added and hosted on a cPanel account.

  • You have access to WHM (or full cPanel DNS and SSL management permissions).

  • A wildcard SSL certificate (Let’s Encrypt, AutoSSL, or custom) is installed or ready to install.

  • The domain’s DNS is managed via cPanel or your DNS provider (e.g., Cloudflare).


🔁 Step 1: Add Wildcard DNS Record

Option 1: DNS Managed by cPanel (Zone Editor)

  1. Log in to cPanel.

  2. Navigate to: Domains → Zone Editor.

  3. Click Manage next to yourcrm.com.

  4. Click Add Record and enter:

    • Type: A

    • Name: *.yourcrm.com (or just * depending on interface)

    • Address: <Your Server IP>

  5. Click Save Record.

Option 2: External DNS Provider (e.g., Cloudflare)

  1. Log in to your DNS provider’s dashboard.

  2. Add an A record with:

    • Type: A

    • Name: * or *.yourcrm.com

    • Value: <Your Server IP>

    • TTL: Auto or 300


🌐 Step 2: Create Wildcard Subdomain in cPanel

  1. Log in to cPanel.

  2. Go to Domains → Subdomains.

  3. Under Create a Subdomain:

    • Subdomain: Enter *

    • Domain: Select yourcrm.com

    • Document Root: (e.g., public_html)

  4. Click Create.

📝 If cPanel doesn’t allow * as a subdomain:

  • You must manually edit Apache configs via WHM or root shell (advanced).

  • Or request hosting provider support to enable wildcard subdomains.


🔐 Step 3: Install Wildcard SSL Certificate

Wildcard certificates require DNS-01 challenge verification.

Option A: AutoSSL (WHM or cPanel)

  1. Navigate to SSL/TLS → Manage SSL Sites.

  2. Check if AutoSSL has installed a wildcard certificate:

    • If not, go to SSL/TLS → Let's Encrypt or AutoSSL panel in WHM.

  3. Enable:

    • Secure wildcard domain via DNS-01.

  4. If needed, add the required TXT record in your DNS zone.

  5. Run AutoSSL again or complete manual verification.

  6. Once verified, install the wildcard certificate.


✅ You’re Done!

Your cPanel server is now configured to handle wildcard subdomains and SSL for SaaS tenants under *.yourcrm.com.

Last updated