Guides
How to connect a custom domain to a static site: DNS explained simply
A plain-English guide to A records, CNAMEs, www vs root domains and HTTPS — and the exact steps to point your domain at a static site.
The StaticHero Team · · 2 min read
Your site works at something.statichero.site, and now you want it at yourname.com. The only thing standing between you and that is DNS — which sounds intimidating but boils down to one or two records.
What DNS does
DNS is the internet’s address book. When someone types yourname.com, their browser asks DNS “which server is this?” and DNS answers with an address. Connecting a domain means adding an entry in that address book that points at your host.
You manage DNS wherever your domain’s nameservers are — usually the registrar where you bought it (Namecheap, GoDaddy, Porkbun, Google/Squarespace Domains), or Cloudflare if you moved it there.
The two records you’ll meet
A record — points a name directly at an IP address. Used for root domains (yourname.com, written as @ in most DNS panels).
CNAME record — points a name at another name. Used for subdomains like www.yourname.com, blog.yourname.com or shop.yourname.com.
The rule of thumb: root domain → A record; subdomain → CNAME.
Step by step
- Add the domain in your host. In StaticHero, open your site → Domains → enter
yourname.com. Tick “also redirect www” to cover both. - Copy the record we show you. For a root domain that’s an A record with a server IP; for a subdomain it’s a CNAME.
- Create it at your DNS provider. Name
@(root) or the subdomain name, type A or CNAME, the value we gave you. Leave TTL on the default. - Remove conflicting records. If there’s an old A or AAAA record for the same name (often a “parked page”), delete it.
- Wait a few minutes. We check automatically and email you when it’s connected.
Put your site online in seconds — free.
How long does it take?
Usually minutes. Sometimes a few hours, because DNS answers are cached around the world for the TTL period. If it’s been more than a day, the record is probably wrong — double-check the name and value.
What about HTTPS?
You don’t need to buy or install a certificate. Once your domain points at StaticHero, a free certificate is issued automatically on the first visit and renewed before it expires.
www or no www?
Pick one as your main address and redirect the other to it. It doesn’t matter which — just be consistent so search engines don’t see two copies of your site. StaticHero’s “also redirect www” option sets up the redirect for you.
Troubleshooting
“Points to a different address.” Another A record still exists, or your registrar’s parking page is enabled. Remove it.
“CNAME at root not allowed.” Most DNS providers don’t allow CNAMEs on the root. Use the A record for the root domain.
Cloudflare’s orange cloud. If you use Cloudflare DNS, set the record to “DNS only” (grey cloud) while connecting, so we can verify it and issue the certificate.
Email stopped working. You probably changed or deleted MX records. Only the A/CNAME record for the website needs to change.
DNS is a one-time job. Do it once, and your site has a home you own for as long as you keep the domain.
Keep reading
Your site could be live in the next minute.
One site free, forever. No credit card, no setup, no servers.