Custom domains for Forgejo Pages

Custom domains should be the last step after the build, deploy path, and rollback story are stable.

Pages

What this solves

You want a Pages deployment served from your own hostname.

Best fit

  • Documentation domains
  • Project websites
  • Customer-facing static sites

How to think about it

Domain setup is operational, not just cosmetic. First prove the generated site works on the default Pages hostname, then move DNS with a rollback plan and clear ownership for the repository, workflow, and domain.

DNS rollout checklist

1. Deploy to the default Pages hostname
2. Verify HTTPS, redirects, assets, and canonical URLs
3. Lower DNS TTL before cutover
4. Point the custom hostname
5. Check certificates and rollback path

Practical path

  1. 01 Deploy successfully on the default Pages hostname first.
  2. 02 Point DNS only after the site is stable.
  3. 03 Keep repository, workflow, and DNS ownership documented for incident response.

When to choose another path

Keep DNS ownership documented with the repository owner.

Verify canonical URLs and redirects after cutover.

Do not debug build failures and DNS failures at the same time.

Next resources

Related reading