# How to Build a Custom Go Vanity Import Proxy with Caddy and Nginx

DevFeed: [How to Build a Custom Go Vanity Import Proxy with Caddy and Nginx](<https://devfeed.tech/articles/how-to-build-a-custom-go-vanity-import-proxy-with-caddy-and-nginx-61081.md>)

Original publisher: [Read original article](<https://www.sitepoint.com/custom-go-vanity-import-proxy-caddy-nginx/>)

Author: SitePoint Team

Published: 2026-09-28T14:42:18Z

Content type: tutorial

Language: en

Sources: [SitePoint](<https://devfeed.tech/sources/sitepoint.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [import](<https://devfeed.tech/topics/import.md>), [nginx](<https://devfeed.tech/topics/nginx.md>)

Tags: [computing](<https://devfeed.tech/tags/computing.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [deploy](<https://devfeed.tech/tags/deploy.md>), [devops](<https://devfeed.tech/tags/devops.md>), [docker](<https://devfeed.tech/tags/docker.md>), [go](<https://devfeed.tech/tags/go.md>), [guide](<https://devfeed.tech/tags/guide.md>), [hosting](<https://devfeed.tech/tags/hosting.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [http](<https://devfeed.tech/tags/http.md>), [https](<https://devfeed.tech/tags/https.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [nginx](<https://devfeed.tech/tags/nginx.md>), [programming](<https://devfeed.tech/tags/programming.md>), [proxy](<https://devfeed.tech/tags/proxy.md>), [reverse-proxy](<https://devfeed.tech/tags/reverse-proxy.md>), [script](<https://devfeed.tech/tags/script.md>), [self-hosted](<https://devfeed.tech/tags/self-hosted.md>)

## AI overview

This tutorial shows how to build a Go vanity import proxy with Caddy or Nginx. It covers setting up a company-controlled domain, DNS and HTTPS, returning module discovery metadata, testing with Docker Compose and a Bash script, and deploying the endpoint. Vanity paths can keep module import paths stable when a repository moves, but they do not change paths already published under a Git host's domain.

## Source excerpt

Learn how to build and deploy a lightweight vanity import proxy with Caddy and Nginx to establish permanent, vendor-agnostic Go module import paths. Continue reading How to Build a Custom Go Vanity Import Proxy with Caddy and Nginx on SitePoint.