The domain is the part visitors remember and the part that outlives the host. StaticScope does not register domains or manage DNS. It builds every link for one address, and the rest is a few records at your DNS provider plus a domain setting at the host.
Get the order right and this takes twenty minutes. Get it wrong and you spend an evening wondering why the certificate will not issue or why every canonical tag still names the old address.
Pick one name and redirect the other
You will serve the site at either the apex (example.com) or the www subdomain. Both work. What does not work is treating them as two sites, with two certificates, two sets of links and two sets of analytics.
The apex is shorter and easier to say. The www form is a subdomain, so it can be a CNAME, which is the one record type every DNS provider handles at the edge of a zone. It also keeps cookies scoped to the site rather than the whole domain.
Pick the one you will print, add both names at the host and redirect the other to the canonical one with a 301. Netlify does this when you set a primary domain. Cloudflare needs a redirect rule or Bulk Redirects. GitHub Pages has no redirect control, so pick one and point the other at it only if you can live with both answering.
The records you will meet
- A and AAAA. Point a name at an IPv4 or IPv6 address. Used at the apex when the host gives you addresses.
- CNAME. Points a name at another name. Cannot coexist with the other records an apex needs, which is why
wwwis the simpler choice. - ALIAS or ANAME. Provider-specific records that behave like a CNAME at the apex. The name and support differ: some providers call it CNAME flattening.
- TTL. How long a resolver may keep an answer, in seconds. Lower it before a change, not after.
A CNAME at the apex is not allowed by the DNS standard because the apex already has SOA and NS records. Providers that appear to allow it are resolving the target and answering with A and AAAA records behind the scenes.
What each host asks for
GitHub Pages. Add the custom domain under the repository’s Pages settings. GitHub wants A and AAAA records at the apex, or a CNAME for www pointing at owner.github.io. Copy the current addresses from GitHub’s own documentation rather than an old blog post. With branch publishing GitHub also keeps a CNAME file in the branch, and the add-on preserves that file across publishes.
Netlify. Add the domain in the project and use the record Netlify shows you. A www name is a CNAME to the Netlify site. An apex usually needs an ALIAS or ANAME at your DNS provider, or Netlify DNS. Certificates are issued and renewed by Netlify once DNS resolves.
Cloudflare Pages. Add the domain to the Pages project, then create the CNAME Cloudflare names, normally to project.pages.dev. If the zone is on Cloudflare, an apex works through CNAME flattening. On external DNS, the apex needs ALIAS or ANAME support.
S3 with CloudFront. Add the domain as an alternate domain name on the distribution and attach an ACM certificate issued in us-east-1. That region requirement is often missed. Then point an alias record at the distribution. The bucket name does not have to match the domain when CloudFront is in front.
Your own server. Point A and AAAA records at the machine and issue a certificate that covers both the apex and www if you serve both. The server add-on publishes files; it does not touch DNS or TLS.
Propagation and caching
There is no global switch that flips a DNS change everywhere. Each resolver keeps the old answer until its TTL expires. That is why one person sees the new site and another sees the old one for a few minutes.
Lower the TTL to 300 seconds a day before a cutover. Check from more than one resolver, because your own machine and your ISP may cache differently.
dig +short example.com
dig +short www.example.com
dig @1.1.1.1 example.com
curl -sI https://example.com | head -n 5
HTTPS certificates
GitHub, Netlify and Cloudflare issue and renew certificates for you. You still have to wait for DNS to resolve before issuance can succeed, and the certificate has to cover every name you serve. A certificate for www.example.com does not cover example.com.
On your own server, Certbot or your host’s panel does the work. An HTTP-01 challenge needs port 80 reachable and the domain already pointing at the machine. A wildcard needs a DNS-01 challenge. Check that renewal runs:
certbot renew --dry-run
openssl s_client -connect example.com:443 -servername example.com \
</dev/null 2>/dev/null | openssl x509 -noout -dates
Do not turn on HSTS until HTTPS works on every name you intend to cover. HSTS is remembered by the browser, so a mistake outlives the DNS record you were testing.
Do not change the WordPress address. StaticScope’s Published site address is where the static copy lives. WordPress’s own Site Address under Settings → General is where the admin and the crawler live. Pointing that at the static host breaks the admin, the build and every URL in the database.
Change the address, then rebuild
Links in the prepared site are absolute. Canonical tags, sitemaps, feeds, structured data and internal links all carry the address that was set when the site was built. Changing the domain at the host does not change any of them.
- Add the domain at the host and create the DNS records.
- Wait until the certificate is issued and the host answers on HTTPS.
- Change Published site address in StaticScope, or Address on the environment.
- Build the site again.
- Publish.
- Check a canonical tag, a sitemap entry and two internal links on the live site.
The add-ons differ on what happens if you skip the rebuild. The Your server add-on refuses to publish. The S3 add-on warns and will publish the stale copy if you press the button. GitHub, Netlify and Cloudflare do not check at all. In every case the fix is the same: build again.
If WordPress itself is moving to a new domain, that is a separate migration. It needs a database search and replace and a new admin address, and the crawler has to reach the new one. Do not fold that into a static publish.
Keep the old domain working
Keep the old domain registered and redirect it to the new one for at least a year. Old links, bookmarks, email signatures and search results all outlive the launch. A 301 at the CDN or the old host is cheaper than losing the traffic.
GitHub Pages cannot do this redirect. Netlify and Cloudflare can. On your own server it is one line in the vhost. If the domain also carries email, leave the MX records alone and redirect only HTTP and HTTPS.