An example of a not-so-great URL design: Amazon product links have an optional slug before everything else like `{slug}/dp/{id}`. So you end up copying a gigantic URL everytime you wish to share a product unless you use the share product button to get the shortened link.
Examples of Great URL Design (2023)
51–60 of 163 posts
Re: Examples of Great URL Design (2023)
#52I found Notion's URL schema interesting as well. They have to contend with renames of pages, reorganisation of the hierarchy and all that. So they have something like: notion.so/:account/Current-Name-of-Page-:pageid where the name changes if the page is renamed, but the redirect works, as the page ID is unchanged. In fact, one can just use notion.so/:account/:pageid and gets redirected to the right page, or even noti…
I don't understand why the :pageid needs to be prefixed with anything here.
Re: Examples of Great URL Design (2023)
#53Earlier quoted context omitted.
I just delete everything after the product ID manually. There are probably easier methods.
The point is that the id comes last.
Re: Examples of Great URL Design (2023)
#54I found Notion's URL schema interesting as well. They have to contend with renames of pages, reorganisation of the hierarchy and all that. So they have something like: notion.so/:account/Current-Name-of-Page-:pageid where the name changes if the page is renamed, but the redirect works, as the page ID is unchanged. In fact, one can just use notion.so/:account/:pageid and gets redirected to the right page, or even noti…
I don't understand why the :pageid needs to be prefixed with anything here.
Kinda smart.
Also; taking it from the end means you only need to parse the string as an offset from the end. It can make load balancing much faster in theory.
Re: Examples of Great URL Design (2023)
#55Re: Examples of Great URL Design (2023)
#56> stackoverflow.com/questions/16245767/how-to-bake-a-cake
Fortunately for SO the fake slug is not preserved and redirects to the real one (so e.g. stackoverflow.com/questions/16245767/motheficker is not served from their site), much to the chagrin those of us with childish sense of humor who some 25 years ago enjoyed dynamically generated nonsense like:
https://web.archive.org/web/20031007123544/http://john.isgay...
Re: Examples of Great URL Design (2023)
#57Earlier quoted context omitted.
The first example is just that. Put the id in the URL and make the slug optional. Stackoverflow makes the slug completely optional but you have the choice of only accepting foo and bar in your example
> https://stackoverflow.com/questions/78870603/i-LOVE-genocide This is bad.
Re: Examples of Great URL Design (2023)
#58We take the typical blog url design (/2024/08/14/slug) for granted but back in the very early 2000s pretty much every blog tool had its own URL design. Matthew Thomas back then took an inventory: https://web.archive.org/web/20030810201315/http://mpt.phrase... He was on the search for his ultimate blogging system, where this "cruft-free" URL structure should be used: https://web.archive.org/web/20051107103030/http://m…
Re: Examples of Great URL Design (2023)
#59Re: Examples of Great URL Design (2023)
#60I forget where I ran across it, but one interesting adoption of URL design is to make the root of the directory part of the site's domain name. I.e. there was someone's website that was shared on HN, where their name was assembled with the domain name, TLD, and some characters after the first slash: firstna.me/lastname/ firstna.me/lastname/about