This page gets you here: visitors can open this static site on your own domain.
The platform subdomain (code.sites.…) exists as soon as you create the site. This page is the extra step of attaching your own domain.
Do not put the static-site domain on Site Settings → Custom domain. That page only attaches the CMS site. See Attach a custom domain.
Where
Static sites → Manage on that site → Custom domain.
The placeholder is www.example.com. The button is Save domain. On success you see Saved.
Steps
- Finish Publish at least once, and confirm the platform subdomain looks right.
- Copy the platform address shown at the top of the edit page (for example
https://campaign.sites.timtech.tw). - Under Custom domain, enter the hostname in lowercase. Do not add
https://or a slash. For examplewww.campaign.example.com. - Click Save domain.
- At the domain registrar, point that hostname’s CNAME at the platform subdomain’s hostname (the address above without
https://, for examplecampaign.sites.timtech.tw). If the registrar does not support CNAME on the apex (example.comwith no www), use the registrar’s redirect or ALIAS, or setwwwand send the apex to www. - DNS can take from a few minutes to a few hours. After it checks out, visitors who open the platform subdomain are sent to the custom domain (except preview links).
Before DNS checks out, the platform subdomain and the custom domain can both open, so you can compare. The admin still shows the platform subdomain, which helps when you are debugging.
Leave the field empty and click Save domain again to clear this static site’s custom domain.
If you are told the domain is already in use, another static site or another site already has it. Use a different domain, or remove it where it is attached now.
How to check
- In a private window, open
https://your-domain/. The content matches the published static site, and the certificate is valid. - Open preview from the admin still stays on the platform subdomain. It is not sent away.
- After verification, opening
code.sites.…directly should send you to the custom domain.
When it gets stuck
| What you see | What to do |
|---|---|
| You entered it on the CMS custom-domain page | Go back to Custom domain on this static site |
| It will not open, or the certificate is wrong | Wait for DNS. The CNAME target must match the platform hostname shown in the admin, with nothing pointing at an old host |
| Preview is also sent away | Use the preview link from the admin (it includes the preview parameter). Do not open only the custom domain |
| The apex and www behave differently | Set records for both, or tell people only one of them |
