From random subdomain to your own domain
Your static site deploys to something like my-site.pandastack.app. Shipping it on www.mycompany.com is a few DNS records plus an SSL certificate — but the details (apex vs. www, CNAME vs. A, certificate validation) trip people up. This guide explains each record so you understand what you're doing.
The two domain forms you'll configure
- Apex (root) domain:
mycompany.com— no subdomain. - www subdomain:
www.mycompany.com.
You almost always want both to work, with one redirecting to the other. The DNS record types differ between them, which is the source of most confusion.
DNS record types, quickly
| Record | Points to | Used for |
|---|---|---|
A | An IPv4 address | Apex, when host gives an IP |
AAAA | An IPv6 address | Apex (IPv6) |
CNAME | Another hostname | Subdomains (www, app) |
ALIAS/ANAME | Another hostname (at apex) | Apex, when host gives a hostname |
The classic gotcha: a CNAME is not allowed at the apex by DNS rules. If your host gives you a target *hostname* (not an IP) for the apex, you need an ALIAS/ANAME/flattened-CNAME record, which many DNS providers (Cloudflare, etc.) support.
Step 1: add the domain in the platform
In PandaStack, open your static site → Domains → Add custom domain. Enter www.mycompany.com (and/or the apex). The platform shows you the exact DNS target to point at and begins certificate provisioning once DNS resolves.
Step 2: create the DNS records
At your DNS provider (where you bought the domain or wherever your nameservers point):
For the www subdomain (easy — CNAME):
Type: CNAME
Name: www
Value: <target shown by the platform, e.g. my-site.pandastack.app>
TTL: 300 (or auto)For the apex domain (two options):
# Option A — host gives you an IP:
Type: A
Name: @ (the apex)
Value: <IP address from the platform>
# Option B — host gives you a hostname; use ALIAS/ANAME/flattening:
Type: ALIAS (or ANAME, or CNAME flattening on Cloudflare)
Name: @
Value: <target hostname from the platform>Use whichever option matches what the platform tells you to point at.
Step 3: redirect apex <-> www
Pick a canonical form and redirect the other to it (good for SEO and consistency). Most platforms let you set the primary domain and auto-redirect the other. If you want mycompany.com to redirect to www.mycompany.com (or vice versa), set the primary in the Domains UI and the platform handles the 301.
Step 4: wait for SSL
Once DNS resolves to the platform, automatic SSL (via Let's Encrypt-style ACME) provisions a certificate. This usually takes a few minutes after DNS propagates. PandaStack issues and renews the certificate automatically — you don't run certbot.
Verify it's live:
# DNS resolving correctly?
dig www.mycompany.com +short
# certificate valid and HTTPS serving?
curl -sI https://www.mycompany.com | head -n 1
# expect: HTTP/2 200DNS propagation reality
- New records typically resolve within minutes, but DNS caches mean it can take up to a few hours globally.
- Lower the TTL (e.g., 300s) *before* making changes if you anticipate switching, so caches expire fast.
- Check propagation from multiple locations if it looks stuck — your local resolver may be caching an old value.
Common problems and fixes
- "CNAME at apex not allowed": your provider doesn't support ALIAS/flattening. Move DNS to one that does (Cloudflare), or use the
Arecord option if the host offers an IP. - SSL stuck pending: DNS isn't fully resolving to the platform yet, or an old
A/CNAMEis still cached. Confirm withdigthat the record points where the platform expects. - Mixed content warnings: your site references
http://assets. Use protocol-relative orhttps://URLs. - www works, apex doesn't (or vice versa): you only configured one. Add the missing record.
- CAA record blocking issuance: if you have a
CAArecord, ensure it permits the platform's certificate authority.
Step 5: confirm and harden
- Force HTTPS (redirect http -> https) — usually on by default.
- Confirm the redirect direction (apex <-> www) matches your canonical choice.
- Update any hardcoded URLs in your site to the final domain.
References
- Cloudflare on CNAME flattening at the apex: https://developers.cloudflare.com/dns/cname-flattening/
- MDN: how DNS works / record types: https://developer.mozilla.org/en-US/docs/Glossary/DNS
- Let's Encrypt / ACME: https://letsencrypt.org/how-it-works/
- CAA records explained: https://www.rfc-editor.org/rfc/rfc8659
- dig command reference: https://linux.die.net/man/1/dig
---
Want your static site on your own domain with automatic SSL and no certbot? PandaStack issues and renews certificates for you. Add a domain free at https://dashboard.pandastack.io