Direct answer
Velocity [forced-hosts] chooses a preferred backend list based on the hostname the client presents, allowing different subdomains to land on different servers.
Step-by-step procedure
- Ensure the destination backend names exist in
[servers]and are reachable from the proxy. - In the TOML
[forced-hosts]table add an entry such as"play.example.com" = ["lobby"](replace the hostname and backend name with your own). - Point the DNS hostname toward the public proxy, not directly to its private backends.
- Connect using both the forced hostname and the default address, and compare destinations.
Common mistakes and trade-offs
SRV records can affect which hostname reaches Velocity; PaperMC documents cases where the SRV target rather than the address typed by a player must match the forced-host key.
How to verify it worked
Check the exact hostname and port presented during the connection, then inspect proxy logs and the destination backend.
Version and platform differences
This routing is not authorization: still enforce permissions, backend firewalling and a compatible forwarding configuration.
Official references
These sources were checked for the current MSH revision. Version-sensitive details should always be confirmed against the project documentation for the release you run.
Related guides
Help us improve this article
Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.