On this page
example.com is a root domain (also called an apex or naked domain). www.example.com is a subdomain: it has a word in front. To your visitors they look like the same site, but in DNS they are two separate addresses, and Swarmz treats each one as its own domain.
Which should I connect?#
Root domain (example.com) | Subdomain (www.example.com, app.example.com) | |
|---|---|---|
| Works on every DNS provider | No | Yes |
| Shorter to type | Yes | No |
| Record Swarmz asks for | CNAME on @ | CNAME on the subdomain name |
Subdomains are the safe choice. Root domains work only where the DNS provider can point a root at another name. Providers that can include Cloudflare, Amazon Route 53, DNSimple, Porkbun and Squarespace Domains. Providers that cannot include GoDaddy, Namecheap, IONOS, Hostinger and many web hosts.
When you type a root domain#
In the Connect your domain step, Swarmz looks up who runs your DNS and tells you what to expect:
- Supported provider. No warning. Carry on.
- Unsupported provider. A yellow note names the provider and offers Use a subdomain (it suggests
app.example.com) or Switch to Cloudflare DNS, which is free and takes about five minutes. - Unrecognised provider. A grey note says Swarmz cannot promise root domains work there. Try it, and if it is not live within 30 minutes, use a subdomain or Cloudflare DNS.
Make both addresses work#
Visitors may type either one, so connect both:
- Connect
www.example.com, using a subdomain record. - Connect
example.comas a second domain, if your provider allows it. - Under Tools, then Domains, choose which one is Primary with Set as primary.
Each domain you connect needs its own records. Connecting one does not set up the other automatically, and the domain steps do not create a redirect between them. If you only connect www, people who type the bare example.com will not reach your app unless your DNS provider forwards it. Many registrars have a "domain forwarding" or "redirect" setting that sends the root to www.
Tip
The easiest setup on a basic registrar: connect www.example.com to Swarmz, then use the registrar's forwarding to send example.com to https://www.example.com.
Move to Cloudflare for root domain support#
If you really want the root domain and your provider cannot do it, you can host your DNS at Cloudflare for free. You keep the domain where you bought it and change only its nameservers to Cloudflare's. Cloudflare's setup guide walks you through it. Copy your existing records across first, especially email records, so nothing else breaks. Then connect your domain in Swarmz and set the CNAME to DNS Only.
Common questions#
Do I need www at all?
No. A single subdomain such as app.example.com is enough, as is the root domain on a provider that supports it.
Will visitors who type the other version see an error?
Yes, unless you connect it too or set up forwarding at your registrar.
Can I connect more than one domain to the same project?
Yes. Choose one as Primary. Plan limits may cap how many custom domains you can connect.
Does the TXT record change for www?
Yes. Its name includes the subdomain, for example _cf-custom-hostname.www. Copy the exact name from the connect step.
Was this helpful?
Related articles
Connect your own domain
Point a domain or subdomain you own at your published Swarmz app. It takes about ten minutes of work, then a short wait.DNS records explained
What DNS records are, where to add them, how long they take and how to check they are right, in plain words.Fix a domain that won't connect
Work out why your custom domain is stuck, what each status means and what to change, with tips for common DNS providers.
Still have a question?
Ask about this article, or talk to a person.