Examples of Great URL Design (2023)
The blog post emphasizes the importance of thoughtful URL design, showcasing examples from StackOverflow, Slack, and GitHub, and encourages readers to share their favorite effective URL designs.
Read original articleThe blog post by Jim Nielsen discusses the significance of thoughtful URL design, highlighting its universal nature and various applications. Kyle Aster's insights from 2010 emphasize that URLs are not just for web browsers but serve multiple purposes, including data retrieval and references in printed materials. Nielsen shares examples of effective URL designs, starting with StackOverflow, which balances computer and human needs through its structured URLs that include both unique identifiers and human-readable slugs. He also mentions Slack's marketing campaign that creatively integrates storytelling into its URLs, making them more engaging. Jessica Hische's playful use of a .is domain exemplifies whimsical URL design, while GitHub and NPM demonstrate how URLs can reflect product semantics, allowing users to navigate efficiently without a graphical interface. The post concludes by inviting readers to share their favorite examples of great URL design, suggesting a community interest in this often-overlooked aspect of web development.
- Thoughtful URL design enhances usability and accessibility across various platforms.
- Examples from StackOverflow, Slack, and GitHub illustrate effective URL structures.
- Creative URL designs can incorporate storytelling and whimsy, making them more engaging.
- URLs can serve as navigational tools, reflecting the underlying product semantics.
- The blog encourages sharing additional examples of great URL design.
Related
Surfing the (Human-Made) Internet
The internet's evolution prompts a return to its human side, advocating for personal sites, niche content, and self-hosted platforms. Strategies include exploring blogrolls, creating link directories, and using alternative search engines. Embrace decentralized social media and RSS feeds for enriched online experiences.
Microfeatures I love in blogs and personal websites
The article explores microfeatures for blogs and websites inspired by programming concepts. It highlights sidenotes, navigation tools, progress indicators, and interactive elements to improve user experience subtly. Examples demonstrate practical implementations.
Give people something to link to so they can talk about your features and ideas
Creating dedicated web pages for projects, ideas, or product features aids discussions and sharing. Examples like ChatGPT Code Interpreter and Boring Technology showcase this. Proper documentation enhances usability and SEO.
- Many commenters appreciate the importance of readable and meaningful URLs, citing examples from platforms like Notion, Slack, and GitHub.
- Several users express concerns about the use of numeric IDs in URLs, advocating for more elegant solutions that rely on slugs for uniqueness.
- There is a consensus on the need for URLs to be permanent and manageable, with some users sharing their personal rules for effective URL design.
- Commenters highlight the challenges of changing slugs and the importance of implementing redirects to maintain link integrity.
- Some users critique specific URL designs, such as Amazon's lengthy product links, and suggest improvements for better user experience.
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://mpt.phrase...
I could have sworn there was a changeset in which Matt Mullenweg was implementing those cruft-free URLs in his new fork called Wordpress, but trying for google for something with "Wordpress" from the early 2000s is basically impossible in 2024.
Update: I found this: https://ma.tt/2004/08/mike-on-uris/
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 notion.so/:account/Anything-else-:pageid
works too...This is very handy in my use cases, when various Notion data is extracted into another tool, reassembled, and then needed to have a link to the original page. I don't need to worry about the page's name, or how that name gets converted into the URL, or any race conditions....
The page hierarchy is then just within the navigaton, not in the URL, so moved pages continue to work too (even if this looks like a flatter hierarchy than it really is).
I'm sure there are plenty of drawbacks, but I've found it an interesting, pragmatic solution.
I use that ALL the time. I can navigate straight to any issue by typing a URL. I can switch to the “actions” view for a repo by adding /actions. I can see the file I’m looking at in a branch by editing the URL and swapping “main” for the branch name.
All available via the UI as well, but I interact with GitHub so often that the tiny efficiency boost I get from navigating by URLs really starts to add up.
I also trust them not to break links, based on their track record. My notes and blog posts and even my source code are full of links to issues or code snippets on GitHub.
https://github.com/torvalds/linux/commit/{hash}
I don’t super like repurposing country names like that. Including .io.
It feels this disregards the actual meaning of the extension while ignoring some very legal consequences to be under Indian legal system instead of EU or US.
Format is reuters.com/:category/:headline:date
which is all you need to know what you're clicking on. For example, I don't need to describe this link in order for its contents - and its time-relevance - to be understood:
https://www.reuters.com/world/us-navys-newest-air-to-air-missile-could-tilt-balance-south-china-sea-2024-08-14/
Edit: they are a bit long, though, I supposeURL-rules
URL-Rule 1: unique (1 URL == 1 resource, 1 resource == 1 URL)
URL-Rule 2: permanent (they do not change, no dependencies to anything)
URL-Rule 3: manageable (equals measurable, 1 logic per site section, no complicated exceptions, no exceptions)
URL-Rule 4: easily scalable logic
URL-Rule 5: short
URL-Rule 6: with a variation (partial) of the targeted phrase
URL-Rule 1 is more important than 1 to 6 combined,
URL-Rule 2 is more important than 2 to 6 combined,
URL-Rule 3 is more important than 3 to 6 combined,
URL-Rule 4 is more important than 4 to 6 combined.
URL-Rule 5 and 6 are a trade-off. 6 is the least important.
A truly search optimized URL must fulfill all URL-Rules.
My preferred URL structure is:
https://www.example.com/%short-namespace%/%unique-slug%
https:// – protocol
www – subdomain
example – brand
.com – general TLD or country TLD
%short-namespace% – one or two letters that identify the page type, no dependency to any site hierarchy
%unique-slug% – only use a-z, 0-9, and – in the slug, no double — and no – or – at the end. Only use “speaking slugs” if you have them under your total editorial control.
i.e.:
https://www.example.com/a/artikel-name
https://www.example.com/c/cool-list
https://www.example.com/p/12345 (does not fulfill the least important URL-Rule 6)
They make URLs unnecessarily long, often forcing people to use URL shorteners -- completely defeating the purpose.
They get awkward when the author changes the title. Other commenters mentioned some tricks to get around this issue, but all involve redirects. Cools URLs shouldn't change in the first place.
They don't copy cleanly if you use nonalphanumeric characters, as in nearly every language other than English.
Virtually nobody just looks at a URL these days anyway, with all the search engines, cute thumbnails, and OpenGraph metadata that provide a glimpse of the actual content for you before you even click on it. This is doubly true in the non-English-speaking parts of the world where a slug in a shared URL is often just a jumble of %HEX.
Hand-picked words in URLs are fine, e.g. /about/me. I'm only talking about autogenerated slugs for user-submitted content above.
See all these pages here: https://kde.org/for/
e.g. RJF01 vs ab0fhct99fh2h4fqi2fj9
* have a separate table that maps slugs to IDs, allowing many-to-one relationship, because content's title will be updated, and you don't want to break old links.
* long slugs will get truncated by users. A zero-cost way to recover from that is `select id where slug >= ? order by slug limit 1`
* in either case don't forget to redirect to the canonical URL, so that people can't create duplicate or misleading URLs on your site.
`my.domain/post/123/my-great-slug-that-is-pretty-long-but-doesnt-matter/comment/456`
vs
`my.domain/post/123/comment/456`
eg. series/9876545678 and series/098767890 get treated differently and the analytics get difficult to merge. But really they're the same page just hydrated with different data.
Should've used query params, eg series?id=9876545678
Third-party component have to coexist with existing site navigation logic, so generally you can't safely add URL-based configuration to such a component.
Fortunately, configuration can now be stored in fragment directives in order to hide this from normal site routing. e.g.
https://example.com/page#routing-info:~:additional-routing-info-for-third-party-component
With fragment directives, location.href and location.hash exclude the additional content in the hash after :~:This is used in Transcend Consent Management for configuring parameters to debug and simulate various privacy experiences[1].
1. https://docs.transcend.io/docs/consent-management/reference/...
The idea was really cool, but from talking to people at HP at the time, the implementation was apparently a complete nightmare done with an insane number of rewrites. It was sort of a hit and miss if the thing you typed in after /go/ would actually take you to the correct location, if any.
firstna.me/lastname/
firstna.me/lastname/about
The projects formatted like: https://there.oughta.be/a/wifi-game-boy-cartridge
Do path parameters get to have / in their values?
Let’s say you have a link shortener service and want to allow users to define shortcuts like /mypath/:rest where rest is appended to example.com/
Now you’re in a very interesting position when it comes to resolving URLs.
Curious to hear folks with experience in this
> 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...
Personally I'd avoid using id's and use a 32-bit hash of the URL which is more or less as performant as a straight id lookup. I usually went with murmurhash.
mysite.com/en-us/some-page mysite.com/en-ca/some-page
You can 301 redirect some locale to your "base" URL if you want.
mysite.com/en-us/some-page > mysite.com/some-page
But don't stress too much. Google doesn't really care about URL content any more. People on phones don't care what your URL says. It's at most desktop users, and devs.
Don't stress localizing your URLs...
mysite.com/fr-ca/some-page is just as good as mysite.com/fr-ca/une-page... and the former is a lot easier to tie into email marketing variables.
Just keep your sitemaps in the localized folder.
mysite.com/sitemap.xml... just a link to the various localized sitemaps.
mysite.com/en-us/sitemap.xml etc.
By keeping sitemaps in a localized folder, it'll make it a lot easier for yourself as you go to register your site with each market's locale.
If you just have to localize URLs... consider doing what Amazon does and just tie the URL to an ID.
https://www.amazon.com/Moen-One-Handle-Bathroom-Deckplate-84...
the above is the same as this... https://www.amazon.com/dp/B0CFYPTKF8
And you can put anything you want in the URL string, it just matches on the ID.
https://www.amazon.com/literally-whatever-you-want-here/dp/B...
“We use the words in a URL as a very very lightweight factor. And from what I recall this is primarily something that we would take into account when we haven’t had access to the content yet… [but] as soon as we’ve crawled and indexed the content there then we have a lot more information. And then that’s something where essentially if the URL is in German or in Japanese or in English it’s pretty much the same thing.”
- John Mueller, Google Search Advocate.
I changed it to home.arpa, but I forgot why
Related
Surfing the (Human-Made) Internet
The internet's evolution prompts a return to its human side, advocating for personal sites, niche content, and self-hosted platforms. Strategies include exploring blogrolls, creating link directories, and using alternative search engines. Embrace decentralized social media and RSS feeds for enriched online experiences.
Microfeatures I love in blogs and personal websites
The article explores microfeatures for blogs and websites inspired by programming concepts. It highlights sidenotes, navigation tools, progress indicators, and interactive elements to improve user experience subtly. Examples demonstrate practical implementations.
Give people something to link to so they can talk about your features and ideas
Creating dedicated web pages for projects, ideas, or product features aids discussions and sharing. Examples like ChatGPT Code Interpreter and Boring Technology showcase this. Proper documentation enhances usability and SEO.