Matrix server discovery
/.well-known/matrix/client /.well-known/matrix/server
Standard: Matrix specification
Matrix homeserver discovery: clients and servers find the right homeserver for a user@domain.
What it is
In Matrix, a user is user@example.com, but the homeserver may live elsewhere. /.well-known/matrix/client tells clients where the homeserver's client API is; /.well-known/matrix/server does the same for federation.
The threat it addresses
Without discovery, homeserver URLs would have to be hardcoded or guessed, and a malicious party could redirect federation. The well-known files make the mapping explicit and HTTPS-authenticated.
How it works
- Client: GET /.well-known/matrix/client → {"m.homeserver": {"base_url": "https://homeserver.example"}}.
- Server: GET /.well-known/matrix/server → {"m.server": "homeserver.example:8448"}.
- Delegation lets example.com point at a homeserver hosted anywhere.
Honesty notes
- Demo: points at this origin — no real homeserver runs here.
In the wild
- matrix.org
matrix.org/.well-known/matrix/client
Links verified to serve this URI on 2026-08-05; some point at the governing spec where no live deployment could be verified.
Try it
Live demo
Format-valid demo delegation (no real homeserver)
{
"m.homeserver": {
"base_url": "https://well-known.page"
}
}