Examples of Great URL Design (2023)
blog.jim-nielsen.com
Examples of Great URL Design (2023)
1–10 of 163 posts
Re: Examples of Great URL Design (2023)
#2Re: Examples of Great URL Design (2023)
#3Re: Examples of Great URL Design (2023)
#4Re: Examples of Great URL Design (2023)
#5What’s the best way to handle url slugs that change? For example, if I have www.example.com/page/foo, and the user changes that page’s title to bar, the slug updates to www.example.com/page/bar and anyone visiting the old url gets automatically redirected to the new one. But now the old slug of foo can’t be used again (without appending some unique identifier to it, like foo-th683gh9i).
Stackoverflow makes the slug completely optional but you have the choice of only accepting foo and bar in your example
Re: Examples of Great URL Design (2023)
#6e.g. RJF01 vs ab0fhct99fh2h4fqi2fj9
Re: Examples of Great URL Design (2023)
#7Shout out to the classic "Cool URIs don't change": https://www.w3.org/Provider/Style/URI
Re: Examples of Great URL Design (2023)
#8What’s the best way to handle url slugs that change? For example, if I have www.example.com/page/foo, and the user changes that page’s title to bar, the slug updates to www.example.com/page/bar and anyone visiting the old url gets automatically redirected to the new one. But now the old slug of foo can’t be used again (without appending some unique identifier to it, like foo-th683gh9i).
Re: Examples of Great URL Design (2023)
#9An 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.
Re: Examples of Great URL Design (2023)
#10Do 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