[whatwg/url] Allow W3C DIDs in host position of URLs (Issue #934)

bnewbold created an issue (whatwg/url#934)

### What problem are you trying to solve?

Greetings WHATWG URL specification maintainers! Thanks for all that you do.

I work on the [atproto](https://atproto.com) social web protocol, which defines a nifty `at://` URL scheme to reference data records of a given type published by a specific account:

```
at://<account>/<record-type>/<record-key>

at://did:plc:vwzwgnygau7ed7b7wt5ux7y2/app.bsky.feed.post/3k5nobkf2w72g

```

I think these are pretty nifty and wish they could be used all over the web and internet. We intentionally put the account identifier (W3C DID) in the "authority" part, instead of a network location, as sort of a "big idea" that centers accounts over hosting providers.

Unfortunately, they are not valid WHATWG URLs, because the "host" part contains multiple colons. Our bad! I originally thought we were bending the rules, but it turns out we simply broke them. If we could do it over again, we would probably not design it this way. But now there are billions of content-addressed data records containing strings with this syntax out in the wild, in a live network with many millions of active accounts.

We wonder if WHATWG would be open to making the URL specification more permissive to allow this sort of thing, both for `at:` and for other future schemes.

### What solutions exist today?

The status quo is to acknowledge that these are not technically valid URLs, but keep using them.

This basically just works within the current atproto ecosystem, but causes friction when weaving in with the web and other internet infrastructure (which is something we want to encourage). In particular, folks have started putting these identifiers in HTML metadata tag fields, and that can cause parsing or validation errors.

### How would you solve it?

Make the URL specification more permissive in the "host" section, adding DIDs as an additional allowed syntax. The DID syntax can be parsed unambiguously because it always starts `did:`, then a syntax-constrained "method name", then another colon character (and then additional following method-specific characters).

Alternatively, make the "host" section more flexible in general, with some baseline syntax rules, but generally allow many types of "name" in that position. "Hostname" and "IP Address" would be specific format types that some URL schemes would require.

### Anything else?

This is a huge ask. A change like this would be disruptive and take years, and would involve tons of discussion and standards diplomacy. The changes for IPv6 are maybe the closest historical reference.

The intent of opening this request is to gauge how realistic a change like this might be over time. Is WHATWG receptive to considering this sort of thing at all?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/934
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/934@github.com>

Received on Wednesday, 28 October 2026 03:58:27 UTC