Live data from Hacker News

Examples of Great URL Design (2023)

blog.jim-nielsen.com

121–130 of 163 posts

Re: Examples of Great URL Design (2023)

#121
post #29

I 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…

There is (was?) also a terrible flaw with this, in that any site hosted on Notion (even using its own domain) would show you public pages with a valid page id.

So, if Paul Graham hosted his site via Notion (he doesn't), I could link someone to `https://paulgraham.com/Why-I-Hate-Hackernews-be2839f0-e145-4...` and it would show my (fake) page on PG's domain.

Re: Examples of Great URL Design (2023)

#123
post #116

How about great email address design? Of course firstname@lastname.com is top tier. But there are some interesting hacks you can do, such as firstn@melastname.com if your last name domain isn't available.

I never thought of this! I have an 'a' in my first name but just checked, 'rest of my first name + last name'.com is already taken. Oh well, I already have 'my initials'.dev, it'll have to do.

Re: Examples of Great URL Design (2023)

#124
> website under a .is domain (which is for Iceland, apparently).

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.

Re: Examples of Great URL Design (2023)

#125

Earlier quoted context omitted.

.htm and .html is relevant just like .pdf and .zip etc etc But I agree about .php, .aspx and other extensions that are telling something about the server side. That’s irrelevant for the user.

> .htm and .html is relevant just like .pdf and .zip etc etc it's _kind of_ relevant, if it weren't for the fact that the absence of any extension implies .html >99% of the time

Wouldn't that also include JSON for the other 47% of the time?

Re: Examples of Great URL Design (2023)

#127

We 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…

I guess this reflects a view of blogging that maybe is more what people today would use twitter or mastodon for, with lots of blogposts with the same title like "open thread" or "links for sunday". Today people mostly use blogs to publish essays, and then a slug based on the title should be sufficient, since you're not going to publish two essays with the same title. That's what substack uses.

A useful midpoint is to use just the year. That way you get a fresh namespace on January 1st.

I use that for static files on my blog and it’s worked great for 20+ years:

https://static.simonwillison.net/static/2024/mlx-whisper-gpu...

https://static.simonwillison.net/static/2003/getElementsBySe...

Re: Examples of Great URL Design (2023)

#128
Another interesting related area is designing URLs for third-party components.

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/...

Re: Examples of Great URL Design (2023)

#129
post #30

I might be an outlier, but I don't like slugs in URLs. 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 charact…

URL shorteners are more for UTM tracking codes. Those get long.

Re: Examples of Great URL Design (2023)

#130

We 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…

Search engines usually have a date filter. Here's DDG searching "wordpress" between 2000 and 2005.

https://duckduckgo.com/?q=wordpress&t=h_&df=2000-01-01..2005...

I'm guessing you were looking for:

https://wordpress.org/news/2004/01/cruft-free-uris-in-wp-10/

I assume Google supports something similar, but I've stopped using it.

Post reply on HN