To use Matrix IDs from a given domain, that domain needs to be authorized. There are two alternative ways to do this:
adding a /.well-known/matrix/server URL served on https://wikimedia.org.adding a DNS SRV record in the DNS zone of wikimedia.org.
This was incorrect, see T223835#5230126.
We'll need one of them for T215042: Set up a hosted Matrix.org / Element instance on modular.im.
Live test: federation tester
.well-known URL
Make the https://wikimedia.org/.well-known/matrix/server URL return
{ "m.server": "wikimedia.modular.im:443" }
DNS SRV record
Add an SRV record to the wikimedia.org domain with the content
_matrix._tcp.wikimedia.org 3600 IN SRV 10 5 443 wikimedia.modular.im