Skip to content

Commit 5f8b24a

Browse files
enhancement: add solution for forced hosts not working in Velocity FAQ (#592)
Co-authored-by: Strokkur24 <[email protected]>
1 parent c5d000c commit 5f8b24a

File tree

1 file changed

+15
-4
lines changed
  • src/content/docs/velocity/admin/getting-started

1 file changed

+15
-4
lines changed

src/content/docs/velocity/admin/getting-started/faq.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,21 @@ the best read timeout to use, use `-Dfml.readTimeout=120` and set `read-timeout
9999

100100
### My forced hosts are not working!
101101

102-
First, double-check that you properly set up DNS records pointing to your proxy for the forced hosts
103-
you have selected. Forced hosts are _not_ compatible with SRV records, so if you are relying on SRV
104-
records to direct the player to the proxy, you will need to find a way to get the proxy running on
105-
the default Minecraft port, 25565.
102+
If you are relying on SRV records to direct the player to the proxy, remember that Velocity matches `forced-hosts` using the **hostname the client sends**, which is resolved before the connection — not necessarily the address the player types.
103+
104+
To make `forced-hosts` work with a proxy on a non-default port (e.g. `12345`), use this setup:
105+
106+
Create DNS records:
107+
- **CNAME:** `forced1.example.com → actual.server.address.com`
108+
- **SRV:** `_minecraft._tcp.survival → forced1.example.com` (priority: 0, weight: 0, port: 12345)
109+
110+
In velocity.toml:
111+
```toml
112+
[forced-hosts]
113+
"forced1.example.com" = ["survival"] # survival.example.com
114+
```
115+
116+
Although the player connects via `survival.example.com`, the SRV record points to `forced1.example.com`, and that is what the client sends to Velocity — allowing it to match correctly in `forced-hosts`.
106117

107118
### Plugins unable to modify messages or commands
108119

0 commit comments

Comments
 (0)