(See also doc.bmndr.co/public)
Say you have a note-taking tool like Obsidian or Roam. Or in my case Etherpads. For any given page/document, you want to be able to easily create shareable links and also easily revoke them. Also you need to be able to pick the URLs yourself. For every URL pointing to a document, you should be able to specify if it confers edit access or not. Ultimately we want a list of all the URLs that have ever pointed to your document, with the permissions each of those URLs currently have. No URL reveals any other URL for the page.
Besides editability, every URL has an attribute for whether it’s crawlable or not, i.e. whether it’s strictly share-with-link or truly public.
For SEO reasons and perhaps internet-hygiene reasons, if more than one URL for a document is crawlable, exactly one should be designated rel-canonical. So we have another URL attribute for whether a URL is the canonical one for a document. Only one URL can have this attribute set and in fact we force every document to have exactly one URL specified as the canonical one. That’s how they’re indexed in the admin interface. [Oops, what if you specify a non-crawlable URL as canonical? Also probably every document should just have a UUID unrelated to URL.]
Finally, you can set an optional redirect. Like if I write a document about potatoes and accidentally create the URL foo.com/potatos and give that out, I can make it redirect to foo.com/potatoes.
Altogether there are four attributes for each URL that has ever pointed to the document:
But what about my current distinction of doc.dreev.es URLs being the read-only version and the etherpad URLs being the editable version and I want to kinda minimize who even knows the etherpad domain exists? Or just that I want edit links in a different namespace?
Well, say you have domains like pubnotes.co and privnotes.co and privpad.co — for public notes, private notes, and a private pad for editing notes. You start with a document about cheese at privpad.co/UUID (where UUID is an unguessable string). You decide to point someone to it for editing (or just want a pretty URL yourself) so you add the URL privpad.co/cheese. Then you want to point a slightly wider audience to it for reading so you add the URL privnotes.co/cheese and then later you want to tell the world and add the URL pubnotes.co/cheese. Also at some point you accidentally misspell “cheese” when typing the URL so you add a redirect.
Nothing is ever enforced about which domains can be used for what. They’re all alias URLs for the master document and you simply follow your own conventions such as URLs under privpad.co having editable=true and URLs under pubnotes.co having editable=false.
In the above example, the table of URLs for the cheesy document ends up looking like this:
| URL | Enabled | Editable | Crawlable | Redirect |
|---|---|---|---|---|
| privpad.co/UUID | ✅ | ✅ | ❌ | |
| privpad.co/cheese | ✅ | ✅ | ❌ | |
| privnotes.co/cheese | ✅ | ❌ | ❌ | pubnotes.co/cheese |
| pubnotes.co/cheese | ✅ | ❌ | ✅ | |
| pubnotes.co/cheeze | ✅ | ❌ | ❌ | pubnotes.co/cheese |
For those who care about such things (probably not me), you could also have per-URL fields for requiring a password, or requiring the visitor to log in. Paranoid people could choose to have those set to true for every URL in the list.