Clean vanity URLs for private Go modules

Hide internal repo paths and server IPs behind short, stable import URLs.
One command to set up, works with any Git host.

// Before — private repo
import "github.com/yourorg/private-module"

// Before — self-hosted Git server
import "192.168.1.100/yourorg/private-module"

// After
import "gomod.io/your/private-module" // gomod.io (default)
import "go.yourcompany.com/private-module" // custom domain

Install & use in 30 seconds

Step 1. Install the CLI:

curl -fsSL gomodvanityurls.com/install.sh | bash

Windows? powershell -ExecutionPolicy ByPass -c "irm https://gomodvanityurls.com/install.ps1 | iex" — or use Git Bash, WSL/WSL2, or Scoop.

Step 2. Add a vanity URL:

gvu add gomod.io/private-module https://github.com/yourorg/private-module.git

Step 3. Configure Go environment:

export GOPRIVATE=gomod.io

Step 4. Use it:

import "gomod.io/private-module"

Important: Your module’s go.mod must declare the vanity URL as its module path (e.g., module gomod.io/private-module), not the original repo URL like github.com/yourorg/private-module.

Step 1. Install the CLI and set up your account:

curl -fsSL gomodvanityurls.com/install.sh | bash
gvu auth signup
gvu auth bind user@example.com

Windows? powershell -ExecutionPolicy ByPass -c "irm https://gomodvanityurls.com/install.ps1 | iex" — or use Git Bash, WSL/WSL2, or Scoop.

Step 2. Point your DNS (must be done before adding the route):

go.yourcompany.com  CNAME  gomodvanityurls.com

Step 3. Add a custom domain route:

gvu add go.yourcompany.com/private-module https://github.com/yourorg/private-module.git

Step 4. Configure Go environment:

export GOPRIVATE=gomod.io,go.yourcompany.com

Step 5. Use it:

import "go.yourcompany.com/private-module"

Important: Your module’s go.mod must declare the vanity URL as its module path (e.g., module go.yourcompany.com/private-module), not the original repo URL like github.com/yourorg/private-module.


Features

  • One-command setup — install CLI, add route, done
  • Custom domains — use your own domain with automatic TLS certificates
  • Wildcard routing — cover all repos under a prefix with a single rule (go.mycorp.com/dept/*github.com/dept/*.git)
  • Major version auto-support/v2, /v3, etc. work automatically with no extra route entries
  • Passwordless auth — email OTP, no password to manage
  • Credentials stay local — your access token and Git credentials live only on your machine; the server never stores your SSH keys or repo passwords
  • Monorepo support — serve multiple Go modules from a single repo with Go 1.25 subdirectory routing (--subdir)