Fixing Missing Subdomains on Cloudflare

When adding a domain to Cloudflare, the platform scans for common hostnames but may not detect all subdomains automatically. If your subdomains aren’t working, you’ll need to manually add them to Cloudflare’s DNS settings. This guide walks you through the process step-by-step.

Step 1: Log in to Cloudflare

  1. Visit Cloudflare’s website and log in to your account.
  2. From your dashboard, locate and select the domain where the subdomains are not working.

Step 2: Navigate to the DNS Settings

  1. Once inside the selected domain, go to the DNS tab at the top of the page.
  2. Review the list of DNS records currently configured for your domain.

Step 3: Identify Missing Subdomains

  1. Compare the existing DNS records in Cloudflare with the records in your original DNS provider (where the domain was initially managed).
  2. Look for any missing subdomains. Common subdomains include:
    • www
    • blog
    • mail
    • Any custom subdomains you’ve set up, like shop or api.

Step 4: Add Missing Subdomains

To manually add a subdomain, follow these steps:

  1. Click on the “Add Record” Button:
    • This will open a form to create a new DNS record.
  2. Choose the Appropriate Record Type:
    • For most subdomains, use an A Record or a CNAME Record depending on your setup:
      • A Record: Points the subdomain to an IP address.
      • CNAME Record: Points the subdomain to another hostname.
  3. Fill Out the Details:
    • Name: Enter the subdomain name (e.g., subdomain for subdomain.yourdomain.com).
    • Type: Select the record type (e.g., “A” or “CNAME”).
    • Content:
      • For A Record, enter the same IP address as the base domain (the IP address will be in your original DNS settings). Users often get confused here, so remember: the subdomain shares the same IP address as the root domain unless otherwise specified by your hosting provider.
      • For CNAME Record, enter the hostname it should resolve to (e.g., example.otherdomain.com).
    • Proxy Status:
      • Orange cloud (Proxy enabled): Cloudflare protects and speeds up traffic for the subdomain.
      • Gray cloud (Proxy disabled): Traffic bypasses Cloudflare and connects directly to the server.
  4. Save the Record:
    • Click Save to finalize the addition of the subdomain record.

Step 5: Update Other DNS Records (MX, TXT, etc.)

While configuring subdomains, ensure you also update related DNS records like:

  • MX Records: For email services, ensure the subdomains are configured correctly.
  • TXT Records: Include any necessary authentication entries, like SPF, DKIM, or DMARC.
  • SRV Records: For specific services, like VoIP or chat.

Step 6: Verify All DNS Settings

  1. Double-check all DNS records in Cloudflare against your original DNS provider.
  2. Ensure no subdomains or critical DNS records are missing.

Step 7: Test Subdomain Functionality

  1. Wait a few minutes for DNS propagation.
  2. Test your subdomains in a browser or use online tools like WhatsMyDNS to confirm they resolve correctly.
  3. If necessary, clear your browser cache or flush your local DNS cache.

Troubleshooting Tips

  • TTL Settings: Set the TTL (Time to Live) to a lower value, like 300 seconds, during testing.
  • Firewall Rules: Check Cloudflare’s firewall rules to ensure subdomains aren’t inadvertently blocked.
  • Caching Issues: If changes don’t seem to take effect, purge the Cloudflare cache to force updates.