matrix.to links need to go

Building a decentralized messaging protocol in the most centralized way possible

If you have ever used Matrix you likely came cross matrix.to links. This service is hosted by the Matrix.org Foundation.

Matrix.to links exist to link to rooms, users and events and are specified in point 4.4.2 in the appendix of Matrix spec. They are being used everywhere to link to rooms (users and spaces, these things are just rooms with syntactic sugar at the end of the day). Most clients give you a matrix.to link when sharing rooms, contacts or events.

As you may have picked up on, there is exactly one server almost all clients and users rely on to link to Matrix rooms. This creates a central point of failure which can also easily be blocked by a third party, which goes against the principles that the Matrix spec set for itself:

“The principles that Matrix attempts to follow are: […]

~ https://spec.matrix.org/latest/#introduction-to-the-matrix-apis

Is there a solution to that problem?

Yes, there is. In the form of Matrix URI scheme.

The Matrix URI scheme is registered with the IANA and is formally specified in point 4.4.1 of the appendix of the Matrix spec. It supports all the same attributes that the matrix.to scheme also supports and is understood by all major web browsers and most Matrix clients while not creating a single point of failure.

Funnily enough the matrix.to website actually links to rooms using the Matrix URI scheme for most clients they offer links for, so why not just cut out the middleman.

But what if someone doesn’t have an account or client?

Counterpoint: why does everyone need to be directed to the matrix.org homeserver? That also goes against the principles Matrix set for itself. Matrix has gotten to a point where it is really easy to find a client with a single web search and if that isn’t enough there is also https://matrix.org/ecosystem/clients/ which could be linked to. Example:

Find me on Matrix: @famfo:ccc.ac

Find me on [Matrix](https://matrix.org/ecosystem/clients/): [@famfo:ccc.ac](matrix:u/famfo:ccc.ac?action=chat)

File a bug report with your client and copy the user ID / roomID and paste it into your client manually.

Is it really necessary to point people to a central middleman for matrix URIs if the alternative is to add another link yourself? So: please use the Matrix URI scheme instead of matrix.to links

For more examples and a formal definition, see the specification: https://spec.matrix.org/latest/appendices/#matrix-uri-scheme

Element and others are not helping the case

I said most Matrix clients support the matrix URI. Well only most. Element doesn’t actually register a matrix URI handler with the OS, only an internal one for element URIs which I couldn’t find documentation or any references for. SchildiChat just did s/element/schildichat for that URI, with again, no documentation.

The fact that most clients are creating matrix.to links for rooms, events, etc. is also an issue because I don’t think a lot of people actually know about the matrix URI scheme.

Edits

22.06.2024: add paragraph about clients not registering the matrix URI scheme with the OS