<story><title>Choosing between names and identifiers in URLs</title><url>https://cloudplatform.googleblog.com/2017/10/API-design-choosing-between-names-and-identifiers-in-URLs.html</url></story><parent_chain><item><author>saurik</author><text>Doing this means that:&lt;p&gt;1) there are now an infinite number of URLs for every one of your pages that may end up separately stored on various services (mitigated for only some kinds of service if you redirect to correct),&lt;p&gt;2) if the title changes the URLs distributed are now permanently wrong as they stored part of the content (and if you redirect to correct, can lead to temporary loops due to caches),&lt;p&gt;3) the URL is now extremely long and since most users don&amp;#x27;t know if a given website does this weird &amp;quot;part of the URL is meaningless&amp;quot; thing there are tons of ways of manually sharing the URL that are now extremely laborious,&lt;p&gt;4) have now made content that users think should somehow be &amp;quot;readable&amp;quot; but which doesn&amp;#x27;t even try to be canonical... so users who share the links will think &amp;quot;the person can read the URL, so I won&amp;#x27;t include more context&amp;quot; and the person receiving the links thinks &amp;quot;and the URL has the title, which I can trust more than what some random user adds&amp;quot;.&lt;p&gt;The only website I have ever seen which I feel truly understands that people misuse and abuse title slugs and actively forces people to not use them is Hacker News (which truncates all URLs in a way I find glorious), which is why I am going to link to this question on Stack Exchange that will hopefully give you some better context &amp;quot;manually&amp;quot;.&lt;p&gt;meta.stackexchange.com&amp;#x2F;questions&amp;#x2F;148454&amp;#x2F;why-do-stack-overflow-links-sometimes-not-work&amp;#x2F;&lt;p&gt;Many web browsers don&amp;#x27;t even show the URL anymore: the pretense that the URL should somehow be readable is increasingly difficult to defend. A URL should sometimes still be short and easy to type, but these title slug URLs don&amp;#x27;t have that property in spades.&lt;p&gt;If anything, other critical properties of a URL are that they are permanent and canonical, and neither of these properties tend to be satisfied well by websites that go with title slugs, and while including the ID in there mitigates the problem it leaves it in some confusing middle-land where part of the URL has this property and part of it doesn&amp;#x27;t.&lt;p&gt;If you are going to insist upon doing this, how about doing it using a # on the page, so at least everyone had a chance to know that it is extra, random data that can be dropped from the URL without penalty and might not come from the website and so shouldn&amp;#x27;t be trusted?&lt;p&gt;(edit to add:) BTW, if you didn&amp;#x27;t know you could do this, Twitter is most epic source of &amp;quot;part of the URL has no meaning&amp;quot; that I have ever run across as almost no one realizes it due to where it is placed in the URL.&lt;p&gt;twitter.com&amp;#x2F;realDonaldTrump&amp;#x2F;status&amp;#x2F;247076674074718208</text></item><item><author>yathern</author><text>Great post - I quite like the stackoverflow.com style of `stackoverflow.com&amp;#x2F;questions&amp;#x2F;&amp;lt;question-id&amp;gt;&amp;#x2F;&amp;lt;question-title&amp;gt;`, where &amp;lt;question-title&amp;gt; can be changed to anything, and the link still works.&lt;p&gt;This allows for easy URL readability, while also having a unique ID.&lt;p&gt;In the context of this post (the library example) that would look like&lt;p&gt;library.com&amp;#x2F;books&amp;#x2F;1as03jf08e&amp;#x2F;Moby-Dick&amp;#x2F;</text></item></parent_chain><comment><author>musage</author><text>&amp;gt; 1) there are now an infinite number of URLs for every one of your pages that may end up separately stored on various services (mitigated for only some kinds of service if you redirect to correct)&lt;p&gt;No need to redirect, that&amp;#x27;s what canonical links are for:&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;developer.mozilla.org&amp;#x2F;en-US&amp;#x2F;docs&amp;#x2F;Web&amp;#x2F;HTML&amp;#x2F;Link_types&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;developer.mozilla.org&amp;#x2F;en-US&amp;#x2F;docs&amp;#x2F;Web&amp;#x2F;HTML&amp;#x2F;Link_types&lt;/a&gt;&lt;p&gt;I don&amp;#x27;t disagree in that I mostly dislike URL slugs, too. Except for some hub pages (&amp;quot;photos&amp;quot;, &amp;quot;blog&amp;quot;, etc.), a numerical ID is more than enough. But the combination of ordering and display modes and filtering can still amount to a huge number of combinations, so canonical links are still needed - to have as many options for the user as possible and allow them all to be bookmarked, but also give search engines a hint on what minor permutations they can ignore safely.&lt;p&gt;I wish search engines would completely ignore words in the URL. If it&amp;#x27;s not in the page (or the &amp;quot;metadata&amp;quot; of actual content on pages linking to it, and so on), screw the URL. If it &lt;i&gt;is&lt;/i&gt; in the page (and the URL), you don&amp;#x27;t need the URL. As long as they are incentivized, we&amp;#x27;ll have fugly URL schemes.</text></comment>
<story><title>Choosing between names and identifiers in URLs</title><url>https://cloudplatform.googleblog.com/2017/10/API-design-choosing-between-names-and-identifiers-in-URLs.html</url></story><parent_chain><item><author>saurik</author><text>Doing this means that:&lt;p&gt;1) there are now an infinite number of URLs for every one of your pages that may end up separately stored on various services (mitigated for only some kinds of service if you redirect to correct),&lt;p&gt;2) if the title changes the URLs distributed are now permanently wrong as they stored part of the content (and if you redirect to correct, can lead to temporary loops due to caches),&lt;p&gt;3) the URL is now extremely long and since most users don&amp;#x27;t know if a given website does this weird &amp;quot;part of the URL is meaningless&amp;quot; thing there are tons of ways of manually sharing the URL that are now extremely laborious,&lt;p&gt;4) have now made content that users think should somehow be &amp;quot;readable&amp;quot; but which doesn&amp;#x27;t even try to be canonical... so users who share the links will think &amp;quot;the person can read the URL, so I won&amp;#x27;t include more context&amp;quot; and the person receiving the links thinks &amp;quot;and the URL has the title, which I can trust more than what some random user adds&amp;quot;.&lt;p&gt;The only website I have ever seen which I feel truly understands that people misuse and abuse title slugs and actively forces people to not use them is Hacker News (which truncates all URLs in a way I find glorious), which is why I am going to link to this question on Stack Exchange that will hopefully give you some better context &amp;quot;manually&amp;quot;.&lt;p&gt;meta.stackexchange.com&amp;#x2F;questions&amp;#x2F;148454&amp;#x2F;why-do-stack-overflow-links-sometimes-not-work&amp;#x2F;&lt;p&gt;Many web browsers don&amp;#x27;t even show the URL anymore: the pretense that the URL should somehow be readable is increasingly difficult to defend. A URL should sometimes still be short and easy to type, but these title slug URLs don&amp;#x27;t have that property in spades.&lt;p&gt;If anything, other critical properties of a URL are that they are permanent and canonical, and neither of these properties tend to be satisfied well by websites that go with title slugs, and while including the ID in there mitigates the problem it leaves it in some confusing middle-land where part of the URL has this property and part of it doesn&amp;#x27;t.&lt;p&gt;If you are going to insist upon doing this, how about doing it using a # on the page, so at least everyone had a chance to know that it is extra, random data that can be dropped from the URL without penalty and might not come from the website and so shouldn&amp;#x27;t be trusted?&lt;p&gt;(edit to add:) BTW, if you didn&amp;#x27;t know you could do this, Twitter is most epic source of &amp;quot;part of the URL has no meaning&amp;quot; that I have ever run across as almost no one realizes it due to where it is placed in the URL.&lt;p&gt;twitter.com&amp;#x2F;realDonaldTrump&amp;#x2F;status&amp;#x2F;247076674074718208</text></item><item><author>yathern</author><text>Great post - I quite like the stackoverflow.com style of `stackoverflow.com&amp;#x2F;questions&amp;#x2F;&amp;lt;question-id&amp;gt;&amp;#x2F;&amp;lt;question-title&amp;gt;`, where &amp;lt;question-title&amp;gt; can be changed to anything, and the link still works.&lt;p&gt;This allows for easy URL readability, while also having a unique ID.&lt;p&gt;In the context of this post (the library example) that would look like&lt;p&gt;library.com&amp;#x2F;books&amp;#x2F;1as03jf08e&amp;#x2F;Moby-Dick&amp;#x2F;</text></item></parent_chain><comment><author>simcop2387</author><text>The usual way I&amp;#x27;ve seen to deal with this kind of ambiguity is by doing a 301 redirect so that bookmarks get changed and the url in the address bar is also changed.  It doesn&amp;#x27;t fix external parties linking to the site with the now deprecated url but there was never anything you could reasonably do about that.&lt;p&gt;&amp;gt; If you are going to insist upon doing this, how about doing it using a # on the page, so at least everyone had a chance to know that it is extra, random data that can be dropped from the URL without penalty and might not come from the website and so shouldn&amp;#x27;t be trusted?&lt;p&gt;The fragment doesn&amp;#x27;t get indexed by search engines so not many will see it.  Along with that, in my understanding, having something human readable in the URL helps with SEO in at least google an bing so doing this could hurt your search rankings which isn&amp;#x27;t a good thing.</text></comment>