{"id":309,"date":"2022-11-20T13:31:24","date_gmt":"2022-11-20T21:31:24","guid":{"rendered":"http:\/\/eschatologist.net\/blog\/?p=309"},"modified":"2023-12-18T11:55:17","modified_gmt":"2023-12-18T19:55:17","slug":"mastodon-uris-not-urls","status":"publish","type":"post","link":"https:\/\/eschatologist.net\/blog\/?p=309","title":{"rendered":"Mastodon URIs, not URLs"},"content":{"rendered":"<p>One of the annoying things about Mastodon is that it&#8217;s tough to share Mastodon links and have them open in your favorite app instead of in a web browser. This is due to the lack of a shared scheme <em>or<\/em> a shared server\u2014which makes sense for a distributed\/federated system, but doesn&#8217;t help its usability.<\/p>\n<p>One thing the community should do is use a <strong>URI<\/strong> instead of a URL or a Twitter\/AOL-style &#8220;handle&#8221; to refer to an account: A URI is a Uniform Resource <strong>Identifier<\/strong> that is <em>resolved to<\/em> a URL, which makes it easier to have all links to Mastodon accounts go to the user&#8217;s preferred app\u2014and also enable the global namespace that <a href=\"https:\/\/atp.fm\/\">ATP<\/a> cares about so much.<\/p>\n<p>So instead of saying my Mastodon account is either <code>@eschaton@mastodon.social<\/code> or <code>https:\/\/mastodon.social\/@eschaton<\/code>, I should say that my Mastodon account is<code>acct:eschaton@mastodon.social<\/code>. That will let the Mastodon app\u2014or any other app that registers as a handler for the <code>acct:<\/code> URI scheme\u2013resolve the URI into <code>https:\/\/mastodon.social\/@eschaton<\/code>.<\/p>\n<p>This <code>acct:<\/code> scheme is already well-defined in <a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc7565\">RFC 7565<\/a>, and is very easy to resolve using the <a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc7033\">WebFinger (RFC 7033)<\/a> protocol that Mastodon servers are <em>already required to support<\/em> as part of their support for federation: You transform it into a query against the specified domain, and that tells you what it should resolve to.<\/p>\n<p>So there you go, a global distributed namespace for Mastodon\u2014and other\u2014accounts, based entirely on Internet standards.<\/p>\n<p>The only improvement I could see is to <em>also<\/em> support the use of <a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc2782\">RFC 2782 DNS SRV records<\/a> with WebFinger. This would stop requiring the server that&#8217;s sent the WebFinger query be the one named in the <code>acct:<\/code> URL. That is, instead of sending the query to whatever <code>mastodon.social<\/code> normally resolves it, it could be sent to any of a number of servers specifically set up for handling the queries. That would allow domains to run <code>social.example.com<\/code> etc. while still giving their users <code>example.com<\/code> usernames, without having to run additional software on the main web servers handling the <code>example.com<\/code> content.<\/p>\n<p>But that&#8217;s just an optimization\/evolution. For right here and right now, WebFinger is plenty easy, and so are <code>acct:<\/code> URIs.<\/p>\n<p><strong>Note<\/strong>: One thing this doesn&#8217;t resolve is linking to content on another Mastodon server. Thus one might still want a <code>mastodon:<\/code> URI scheme that <em>works identically to an <code>acct:<\/code> URI<\/em> but also allows reference a post or hashtag. That way you can say &#8220;this content from this account&#8221; and have the resolution happen such that clients don&#8217;t need to &#8220;shell out&#8221; to a web browser to present it. That&#8217;d eliminate another supposed advantage of centralized microblogging systems.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the annoying things about Mastodon is that it&#8217;s tough to share Mastodon links and have them open in your favorite app instead of in a web browser. This is due to the lack of a shared scheme or a shared server\u2014which makes sense for a distributed\/federated system, but doesn&#8217;t help its usability. One&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3],"tags":[154,101],"class_list":["post-309","post","type-post","status-publish","format-standard","hentry","category-technology","tag-mastodon","tag-twitter"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p74loH-4Z","jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=309"}],"version-history":[{"count":7,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/309\/revisions"}],"predecessor-version":[{"id":400,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/309\/revisions\/400"}],"wp:attachment":[{"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}