All other providers / Self hosted

This guide walks you through configuring a wildcard subdomain (*.yourdomain.com) for dynamic subdomain routing, essential for concord SaaS. It supports any DNS provider, web hosting control panels (VirtuAdmin, CloudPanel, etc.), and custom-managed servers.


βœ… Prerequisites

Before you begin, ensure the following:

  • Your primary domain (e.g., yourdomain.com) is pointing to your server.

  • You have access to DNS records (via registrar, DNS host, or control panel).

  • You have access to web server configuration (e.g., Nginx/Apache via panel or SSH).

  • You have an option to install an SSL certificate, ideally wildcard.


πŸ” Step 1: Add a Wildcard DNS Record

Create a wildcard DNS record that points all subdomains to your server.

πŸ”Έ For Any DNS Provider:

  1. Login to your DNS management dashboard (e.g., GoDaddy, Cloudflare, Namecheap).

  2. Add a new A record:

    • Type: A

    • Name: * or *.yourdomain.com (provider-specific)

    • Value: Your server's IP address

    • TTL: Auto or 300 seconds

πŸ“Œ If you're using CNAME flattening (e.g., Cloudflare + external origin), use CNAME instead and point to your main domain.


🌐 Step 2: Configure Web Server to Accept Wildcard Subdomains

Depending on your setup, you’ll configure Apache or Nginx to accept any subdomain.

πŸ› οΈ Apache (Generic or via Control Panel)

Ensure your virtual host file includes:

ServerAlias *.yourdomain.com

If you're using a control panel (CloudPanel, VirtuAdmin, Plesk):

  • Go to the domain’s web settings

  • Find the ServerAlias or Subdomain Settings

  • Add *.yourdomain.com

Restart Apache:

sudo service apache2 restart

πŸ› οΈ Nginx (Generic or via Control Panel)

Ensure the server_name block includes:

server_name .yourdomain.com;

Use .yourdomain.com to catch all subdomains (equivalent to *.).

Restart Nginx:

sudo service nginx reload

πŸ” Step 3: Install a Wildcard SSL Certificate

Wildcard subdomains require a wildcard SSL cert, validated using a DNS-01 challenge.

Use a tool like Certbot:

sudo certbot certonly --manual \
  --preferred-challenges=dns \
  -d "*.yourdomain.com" -d yourdomain.com

Follow instructions to add a TXT record for DNS verification.

Or use your control panel's Let's Encrypt integration (VirtuAdmin, Plesk, CloudPanel):

  • Choose "Wildcard SSL"

  • Complete DNS challenge (add TXT record)

  • Install the cert for your domain


βœ… You're Done!

You’ve now set up wildcard subdomains ready for concord SaaS. New tenants can instantly access their dashboard at clientname.yourdomain.com without any manual DNS or virtual host edits.

Last updated