Attach your own domain to a site on CloudCannon.
To add a custom domain:
- Purchase a domain from a domain registrar
- Go to the Site Settings / Custom Domain section for your site
- Enter your domain with or without a subdomain in the Domain Name box
- Click Add Domain
Once you have added your domain, you will see instructions for configuring your DNS and name servers.
Adding a subdomain is the same as adding a Custom Domain. To add a subdomain:
- Go to the Site Settings / Custom Domain section
- Enter the domain including the subdomain
When there are multiple sites with subdomains on the same domain, a subdomain is delegated as the main domain. All unallocated subdomains redirect to the sites with the main domain. For example:
- A site has www.example.com attached
- Another site has docs.example.com attached
- www.example.com is set as the main domain
Visiting any subdomain other than www.example.com or docs.example.com will redirect to www.example.com.
To set a site with a subdomain as the main domain:
Create at least two sites with the same domain and different subdomains
Navigate to the Domain Settings / Redirects
Click Set Main Domain on a site to redirect all unused subdomains there
Configuring your domain#
Changes to DNS can take up to 48 hours to propagate, depending on the previous TTL set. Test your site is configured correctly with the pingdom DNS checker.
Configuration instructions are shown after adding a domain. There are two choices:
CloudCannon DNS (recommended)
Using CloudCannon DNS allows you to manage your DNS records within CloudCannon. This option automatically provides wildcard SSL certificates for your domain, so all your subdomain sites can be served over HTTPS without extra configuration.
See here for more information about configuring CloudCannon DNS.
If you want to manage your DNS records outside CloudCannon, you can use External DNS. See here for more information about configuring external DNS.
If you are using Cloudflare as your DNS provider, you will need to configure your DNS records differently. See our guide for using a Cloudflare Proxy with CloudCannon.