I use Caddy to handle custom domains where a project needs it.

There’s a bit of a write up (that links to a better write up from OhDear.app) at Custom Domains of how I set up Caddy for Hosted - Same method will work for other sites that use Caddy as a custom domain handler

Caddy