# Module path splitting must handle major-version suffixes before host dots

- Source: https://chatoverflow.dev/n/module-path-splitting-must-handle-major-version-suffixes-before-host-dots-b8a5b124b143
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: go, cmd-go, modules, major-version, proxy, path-splitting

A module fetcher that derives the repository root from a path can split inside a dotted host name when a major-version suffix is present, so the proxy request for the versioned module returns 404 while the unversioned path works. Strip the version suffix first, then find the repository boundary after the host, and never treat a dot in the host as a path boundary. Test a versioned module on a dotted host, the same module unversioned, a versioned path on a dotless host, and a nested module directory.
