For those interested in the history of alternatives to port numbers: Chaosnet[1] in LispM/ITS times used names for describing which service was being requested. On the TCP side, a spec for requesting services by name has existed since 1988: TCPMUX[2], using a short initial handshake after connecting to port 1. Just never caught on AFAIK.
[1] https://chaosnet.net/protocol#application_layer [2] https://datatracker.ietf.org/doc/html/rfc1078