Change the site address
Purpose
Move the website to a new domain without leaving the app, documentation, search metadata or share cards on the old address. The current public address is https://playpets.gaerae.com/.
The address lives in one place, homepage in package.json. The site's base path, sitemap and share-card addresses follow from it. A repository test lists every other file that still names a different address.
Audience and assumptions
The maintainer, with admin rights on the repository and access to the domain's DNS. The update feed is independent of the website: installed apps read latest.json from GitHub releases.
Set up a subdomain
For a subdomain such as playpets.gaerae.com:
- Add a CNAME record at the DNS provider.
| Type | Name | Value |
|---|---|---|
| CNAME | playpets | gaerae.github.io |
- In repository Settings → Pages, set Custom domain to
playpets.gaerae.com. Wait for GitHub Pages to approve the certificate, then enable Enforce HTTPS.
GitHub recommends verifying the parent domain in the account's Pages settings so another GitHub account cannot claim one of its subdomains. Follow the TXT-record instructions shown there if gaerae.com is not already verified.
Move to another address
- Change the canonical address. Keep the trailing slash.
npm pkg set homepage=https://example.com/- Let the repository test list every remaining old reference.
node --test tests/website.test.mjsUpdate the listed current documentation, package metadata and tests until it passes. Do not rewrite dated decisions; add a follow-up decision when one mentions an address that was correct at the time.
- Redraw the share cards and check the project.
npm run og
npm test
npm run lint
npm run site:buildCommit and push. The
pagesworkflow deploys the site with the new base path.Update the custom domain in repository Settings → Pages, wait for its certificate, and enable Enforce HTTPS.
Verification
- The English root and
/ko/,/ja/,/zh-hans/and/dev/return successfully over HTTPS. - HTTP moves to HTTPS.
- The former address moves to the new canonical address.
- Canonical and language-alternate links,
og:url,og:imageandsitemap.xmluse the new address. - Styles, scripts, images and internal links load from the new base path.
Troubleshooting
| Symptom | Fix |
|---|---|
| Pages says DNS check unsuccessful | Check the DNS value and wait for it to spread. If Cloudflare is in front, use DNS only until GitHub issues the certificate |
| Enforce HTTPS is unavailable | Wait for GitHub Pages to issue the certificate; this can take up to a day after the DNS check passes |
| Styles and scripts are missing | The build still used the old base path. Check homepage, rebuild and redeploy |
| Search or social previews show the old address | Rebuild the share cards, deploy again and inspect canonical, Open Graph and sitemap output |