Skip Navigation

How to migrate Go projects to a new domain using Caddy

rocket9labs.com How to migrate Go projects to a new domain using Caddy

I recently migrated from rocketnine.space to rocket9labs.com, including a Forgejo instance. I have a number of projects, including many Go projects. I searched for a way to redirect to a new domain, while still allowing go get commands to work when referencing the old domain. I found this thread whi...

Hey all, I just wrote this up after migrating a metric ton of Go projects hosted on a Forgejo (Gitea) instance to a new domain by adding just a couple of lines to my Caddyfile. I thought the process would be much more involved, but the snippet I found and modified managed to handle everything without any tedious path rewriting or other vanity URL setup.

I hope it's helpful for someone else who needs to migrate to a new domain. I got an email from my registrar recently warning about a 60% price increase for .space TLDs. Careful readers may make a connection between this event and this blog post.

2