11 ms·
Cool URIs Don't Change (1998)
- mlinksva 4y agoWonder if this was posted due to https://prodromou.pub/@evan/109960548029431093 https://prodromou.pub/@evan/109960548029431093
- DamonHD 4y agoYes!
- politician 4y agoPlease add (1998) to the title.
- franze 4y agothis is how I do URLs. My personal battle proven URL rules. URL-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 the page wants to get found for URL-Rule 1 is more important than 1 to 6 combined, URL-Rule 2 is more important than 2 to 6 combines, … URL-Rule 5 and 6 are a trade-of. 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:// https:// – protocol www – subdomain example – brand .com – general TLD or country TLD %short-namespace% – one or two letter that identify the pagetype, no dependency to any site hierachy %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) https://www.example.com/p/12345-prouct-name
- eyelidlessness 4y agoI have no idea why your text is grey because this is all very good advice. The character class limitations might sound arbitrary but no one who takes this seriously is handling Unicode in URLs because there are too many risks. (Not that I’m an authority on the subject but my most regrettable StackOverflow contribution is the regular expression for IRIs which has some flaws and I’ll never revise it because it’s not a good idea.)
- teddyh 4y agoYou’re not thinking very long-term. As the article explains, for long-term resources, your should put some form of date in the URL, such that you do not continually deplete the namespace. For example, suppose that you once wrote an article on AI, in, say, 2008, with the URL https://www.example.com/a/current-developments-in-ai https://www.example.com/a/current-developments-in-ai When the subject, in this case AI, suddenly changes in later years, and you want to write an update, you’ll be forced to use this monstrosity of a URL: https://www.example.com/a/current-developments-in-ai-2 https://www.example.com/a/current-developments-in-ai-2 Why not start with https://www.example.com/a/2008/current-developments-in-ai https://www.example.com/a/2008/current-developments-in-ai so that you can then create https://www.example.com/a/2023/current-developments-in-ai https://www.example.com/a/2023/current-developments-in-ai ? (This will also benefit readers, similarly how HN likes having the year parenthesized in the submitted title.)
- kevin_thibedeau 4y agoYou just made an SEO expert die of a heart attack. They're paranoid about dateable content.
- teddyh 4y agoYou say that like it’s a bad thing.
- MrVandemar 4y agoIf a date is something that helps categorise something in a sane, indexable way, and SEO experts don't like them, they can go and [obscenity] an [animal-noun] with a rusty [ambiguous-from-context] and [illegal-act] and put it in their pipe and smoke it. Metadata matters.
- cbdumas 4y agoIt's a shame magnet URIs never caught on outside BitTorrent
- beders 4y agoYeah, I wish more people would care. I bet 50% of my bookmarks have become obsolete because the URLs weren't err cool.
- theK 4y agoInterestingly, I have found out that there is a lifetime threshold, especially in blogs. I often bookmark relatively new content only to find out that six months later it has 404ed. But then you bookmark some old article and find out ten years later that it still is there, regardless if the blog is still alive or not.
- nextaccountic 4y agoWhen Rust separated its forumses, discuss.rust-lang.org became internals.rust-lang.org and a new forum, users.rust-lang.org was created. the discuss one had a nice redirect to internals, but for some freaking reason it was deleted and all now old links are permanently broken (you can fix them manually in the url though) If someone here is running any part of the Rust infra, please consider getting this redirect back.
- Dalewyn 4y ago>forumses *Eye twitch*
- Vecr 4y agoFora is the correct word, right?
- Aachen 4y agoFor words like forum and datum, both are possible, but also there's a clearly more commonly used option that doesn't confuse everyone. In Dutch, fora is probably about equally common as forums; in English I'm not sure I've seen it ever used. It's like using datum to mean a single data point: "look at me being clever about word technicalities and making everyone do a double take to understand this sentence". At least, that's how I feel when seeing a native speaker use datum instead of data point in English, or in Dutch using data to mean multiple calendar dates (the common word being datums).
- nwatson 4y agoData should be uncountable, like meat. Datum -> data point.
- eyelidlessness 4y agoI don’t know when I internalized that “data” is plural and its singular is “datum”, but it wasn’t when I had a similar reaction to “fora”. The former is just how my brain handles the word’s count, and the latter is very much like your reaction.
- vmoore 4y ago> Except insolvency, nothing prevents the domain name owner from keeping the name I maintained 100+ domains over the years, and had to stop renewing most of them because my income drastically got reduced and I couldn't afford to renew them 'forever'. I was careful about which ones got nuked. They were typically sites that received very little traffic and had their heyday and fun in the sun, and there was no point in having them live on for perpetuity. The few remaining ones I renew (sometimes 10 years in advance because ICANN) still get a lot of traffic and I regularly check the hosting setup to see if they're operating properly, and I check for 404s and downtime, or missing assets like images, JS, etc A domain is something you commit to. If the project atrophies, you have to be willing to nuke it. But there will always be domains which are too good to nuke.
- teddyh 4y ago> I maintained 100+ domains Well, that’s your problem, right there. Use one stable domain which you pay for, and use subdomains. That’s what the DNS is for.
- davchana 4y agoI too used to get domains, now about 5 years ago I got domain byDav.in & now most of my domains are subdomains like, hukamnama.bydav.in apps.bydav.in basically foo.bydav.in Later I got tired of adding txt records, now my simple apps are like spa.bydav.in/weather or spa.bydav.in/radio spa.bydav.in/otp.html
- scoofy 4y agoWhat about in a wiki where things can be created or destroyed?
- Karellen 4y agoThen it will be uncool. Heinous, even.
- scoofy 4y agoSo like... wikipedia does? https://en.wikipedia.org/wiki/Uniform_Resource_Identifier https://en.wikipedia.org/wiki/Uniform_Resource_Identifier
- themodelplumber 4y agoCreated, not a problem. Destroyed, handle gracefully at different levels, and possibly in different ways across the site depending on editorial policy. Things should generally not just disappear and leave URIs non-functional. Sometimes it does have to happen but those times should be true exceptions.
- scoofy 4y agoI mean, that's all fine and good, but how does one have a descriptive uri, while also having it unchanged? Wikipedia has descriptive URI's, presumably they change over time. I know some folks would prefer never breakage to anything else, but it seems like having a permanent URI with a UUID and a descriptive URI that could change over time, if, say, a building changes it's name: https://en.wikipedia.org/wiki/Willis_Tower https://en.wikipedia.org/wiki/Willis_Tower https://en.wikipedia.org/wiki/Sears_Tower https://en.wikipedia.org/wiki/Sears_Tower One now redirects. I feel like, yea, it's cool if your URI's never change, but as someone building a wiki, it's really always seemed a problem without a right answer. I'm honestly asking because the only way I know how to build my site with this feature is to just save the previous uri every time the descriptive once changes.
- themodelplumber 4y ago
- divbzero 4y agoThis was written by Tim Berners-Lee and should have “(1998)” appended to the title. Related: Cool URIs Don't Change (1998) - https://news.ycombinator.com/item?id=29442818 https://news.ycombinator.com/item?id=29442818 - Dec 2021 (72 comments) Cool URIs don't change (1998) - https://news.ycombinator.com/item?id=27537840 https://news.ycombinator.com/item?id=27537840 - June 2021 (140 comments) Cool URIs Don't Change (1998) - https://news.ycombinator.com/item?id=23865484 https://news.ycombinator.com/item?id=23865484 - July 2020 (156 comments) Cool URIs don't change (1998) - https://news.ycombinator.com/item?id=11712449 https://news.ycombinator.com/item?id=11712449 - May 2016 (122 comments) Cool URIs don't change. - https://news.ycombinator.com/item?id=4154927 https://news.ycombinator.com/item?id=4154927 - June 2012 (84 comments) Tim Berners-Lee: Cool URIs don't change (1998) - https://news.ycombinator.com/item?id=2492566 https://news.ycombinator.com/item?id=2492566 - April 2011 (26 comments) Cool URIs Don't change - https://news.ycombinator.com/item?id=175199 https://news.ycombinator.com/item?id=175199 - April 2008 (9 comments)
- crazygringo 4y agoYup. This has been posted so much over the years, I'm not sure there's anything left to comment that hasn't already been commented... :P
- echelon 4y ago> I'm not sure there's anything left to comment that hasn't already been commented I would have agreed with you a year ago. But now, with AI, the entire web model may become less of a thing. I thought the web would endure forever, despite the attacks from platforms and browser monopolizers. Now it looks like social will soon be overrun by robots (maybe creepy ID verification will save it?), and the need to publish information will diminish as you can generate it and probably share the results on some future AI platform.
- sclarisse 4y ago> some future AI platform What does that even mean? Because it could credibly mean like 20 different things, some of which would clearly be nonsense, but you haven’t left us with a specific enough of an idea to engage with either way.
- alexchantavy 4y agoAh the good ol' days of cgi-bin and perl scripts on Apache. When I first learned Apache I thought that all URIs served by a webserver needed to be the same name as the file that they pointed to. Then I learned (embarassingly) much later that in HTTP the URI name can be anything at all and the content that it pointed to didn't even need to be a static file, that it could be dynamic.
- bungle 4y agoCool URIs change all the time. And then they come back. It's like with fashion.
- deleted 4y ago[deleted]
- quitit 4y agoDear home-owner, I like the flowers in your front garden. Please be cool and never change them. I like them there when I drive by from time to time. No I won't just take a photo of them, or plant my own. I need you to maintain them, never landscape your property or be uncool. It doesn't bother me that it costs you money to maintain them, you should have planned for that before I had a chance to see your lovely flowers. Please hand this note to the next home owner. Since I want the flowers to live forever and humans don't. Sincerely, Idealism. (tongue firmly in my cheek)
- kixiQu 4y agoToo many gardeners neglect to acquire the necessary mineral rights to prevent broken lilies. Lamentable lack of forethought.
- iopq 4y agoThe homeowner is the one that posted about a garden in front of their home in their own newsletter. I came there to find out the garden had been moved, but with no notice of where the new address is. I have to go into the archives to look at the flowers, which means the archive person has to give me images from whenever they took the photo, where it might not be from the same year
- kixiQu 4y agoLike, are they? "Their own newsletter" makes it sound like internal links remain broken, something that I will immediately cede is rude to a visitor. But – even if I had publicized something and said "hey everybody come look", it's only social context that determines whether you infer from that "hey everybody come look (forever)". And I think that social context is sort of nonsense. For other people who've created links – that's something they should take care of. I try to clear out my blogroll so people don't see broken links – but no one on that list owed me their permanent web presence.
- iopq 4y agoYes, if you keep a link on your site, that's an invitation to come look forever until you change the link.
- tiffanyh 4y agoJust remember that… URIs != URLs URLs == URIs
- notpushkin 4y agoURLs ⊂ URIs
- tempestn 4y agoOnly tangentially related, but reminds me of something I ran across recently. I've been maintaining a couple of old blogs my wife used to write for years; I don't want to get rid of them, but it was a bit of a pain having to regularly keep wordpress updated and fix any related issues. Recently found a WP plugin, Simply Static, that will generate a static site from a wordpress blog, maintaining all the URLs and such. So it's perfect for my use case of archiving something that won't be added to in the future. But you can also use it for a live site, just exporting a new static version after each post. Used it for those couple of blogs with zero issues, and now I can keep the originals around but inaccessible from the internet, so I don't have to worry about keeping them updated, aside from when I update php itself.
- heywhatupboys 4y agolink?
- cafeinux 4y agoThe first result of a "simply static wordpress" search seems to correspond to what you're asking for : https://wordpress.org/plugins/simply-static/ https://wordpress.org/plugins/simply-static/
- heywhatupboys 4y agono for the blog, I would like to be nostalgically reminded of blogs, they are hard to come by
- irdc 4y agoMaybe https://ooh.directory/ https://ooh.directory/ can help?
- heywhatupboys 4y agothat's awesome thanks! Do you know of any archive site that stored some of the old 2000's blogs?
- CM30 4y agoIt may be an old article now, but the point still stands all these years laters. Like, I get it. If the site shuts down, then the URLs are obviously going to change there. But the sheer amount of times where sites get redesigned and somehow every link to the site breaks at once is utterly ridiculous. There's zero reason to change your URLs every time you change CMS, and there's even less of a reason not to redirect the old URL format to the new one. Yet somehow it happens constantly, especially on news sites which seem to love changing their site structure every few months or something. Sigh.
- Dalewyn 4y ago>There's zero reason to change your URLs every time you change CMS, and there's even less of a reason not to redirect the old URL format to the new one. Are you willing to pay them for that work? No? There's your reason.
- deleted 4y ago[deleted]
- notpushkin 4y agoNo, but I am willing to stop visiting them and/or linking to them.
- sundarurfriend 4y agoYeah. When a site says "the old xyz.oursite.com pages no longer exist. use the search bar to blah blah", there's 90% chance that I'm just going to close the tab and just try a different (even if non-official) site.
- Dalewyn 4y agoThanks for proving my point: There's no value in pursuing people who aren't your customers, who aren't providing you value. If we as end-users want URLs to not rot away, we need to put value on working URLs that convinces webmasters to put in the effort to maintain working URLs.
- esperent 4y agoI'm surprised no one has created a service similar to archive.org but for redirects. It could work as a browser extension and would simply be a library of old broken links and their new locations. Whenever you hit a 404 page it would query the service for an alternative. People can submit links themselves. I've brought up broken links in projects I contribute to on a few occasions and it seems like people basically don't care if there's even a tiny bit of extra work involved to fix it. Complaining about this and expecting people to maintain links themselves won't work.
- cxr 4y agoI have been known to use Hypothes.is to annotate 404 pages with a signpost to the correct place, especially if getting to the correct one isn't as easy as putting the original URL into the Wayback Machine. I always tag them with the "uncool URI" tag. (Funnily enough, some of the pages I've had to use this tag include ones on w3.org or ones associated with projects like runmycode.org or operated by folks at the Internet Archive.)
- snowwrestler 4y agoArchive.org does archive redirects. They are little green bubbles instead of blue on the calendar view.
- logbiscuitswave 4y agoI wish someone at Microsoft would read this. Every 6 months it seems like everything around their documentation site changes and half the links permanently 404. The amount of link rot is just staggering.
- RobotToaster 4y agoA number of times I've clicked hardcoded links in windows only for it to redirect to their homepage.
- gdprrrr 4y agoAlso Sun, Oracle and OpenJDK please
- kristopolous 4y agoIt's a system design oversight. Permanence was long sought for. I'm not claiming I've got all the solutions but it's yet another example of how the web is incomplete. If you read the contemporaneous history from the early 1990s when the concrete of the web was still wet it should become obvious that it's worth a revisit of the fundamentals For instance, DNS could include archival records or the URL schema could have an optional versioning parameter. Static snapshot could be built in to webservers and archival services would be as standard as AWS or a CDN; something all respectable organizations would have, like https. These only sound nutty because it's not 1993 anymore and we've presumed these topics are closed. We shouldn't presume that. There's lots of problems that can be fixed with the right effort and intentions. Especially because we no longer live in the era where having 1GB of storage means you have an impressively expensive array of disks. Many unreasonable things then are practically free now
- myfonj 4y agoI am constantly pondering ideas how could intuitive and "cool" web without broken URLs look like, and whether mechanisms for it are or are not embraided into original standards. Farthest I got is that we probably should see two addresses where we currently see one in our URL bar: Locator and Identifier and whole web-related technology should revolve around this distinction with immutability in mind. - On server side Locators should always respond with locations of Identifiers or other Locators. So, redirects. Caching headers makes sense here, denoting e.g. "don't even ask next five minutes". - Content served under Identifier should be immutable. So "HTTP 200" response always contains same data. Caching headers here makes no sense at all, since the response will always be the same (or error). In practice, navigating to https://news.ycombinator.com/ https://news.ycombinator.com/ (locator) should always result in something like HTTP 302 to https://news.ycombinator.com/?<timestamp> https://news.ycombinator.com/?<timestamp> or any other identifier denoting unique state of the response page. Any dynamic page engine should first provide mechanism producing identifiers of any resulting response. I feel there are some fundamental problems in this utopian concept (especially around non-anonymous access), but nevertheless would like to know if it could be viable at least in some subset current/past web.
- 4y ago
- brigandish 4y agoObligatory nod to the tag URI schema[1]. Embed them in your blog pages or whatever and at least they'll still be discoverable after a URL change. [1] http://www.faqs.org/rfcs/rfc4151.html http://www.faqs.org/rfcs/rfc4151.html
- k__ 4y agoIf you want permanent URIs, then use IPFS instead of HTTP.
- sph 4y agoShameless self promotion: this is the problem my project sets out to solve, because while this advice is obvious and well known, URIs keep changing and sites keep breaking. So I'm developing a service that every day crawl your website and tests every single resource, be it regular links, images, CSS, fonts, and also external links over one has little control. And one of the features coming soon post-launch is getting notified if you change an URL and forgot to set a redirect from the old one, breaking SEO, bookmarks, and this very advice. I'm starting a closed alpha this month and launch the next, so if you're interested in trying this out, send me an email. https://bernard.app https://bernard.app
- DamonHD 4y agoAnd will it offer (efficient) copy-n-paste redirect rules to add to your Apache / ISS / etc config to fix the issue? That would be interesting.
- sph 4y agoNot yet but that is an excellent idea. I'll add it to my todo list :-) EDIT: it's harder than it seems, because it is almost impossible to tell what is the new URL if you forgot to set up the redirect.
- DamonHD 4y agoAnd you have no idea of the context available in the config file, but that may be where the value lies... (Feel free to add earth.org.uk to your trial if you wish, email as here and/or on the site. I can share config with you.)
- pwdisswordfishc 4y ago> Historical note: At the end of the 20th century when this was written, "cool" was an epithet of approval particularly among young, indicating trendiness, quality, or appropriateness. In the rush to stake our DNS territory involved the choice of domain name and URI path were sometimes directed more toward apparent "coolness" than toward usefulness or longevity. This note is an attempt to redirect the energy behind the quest for coolness. Cool. Now what’s an URI?
- pheeney 4y agoI always struggle designing urls in the first place with SEO in mind. Do I put an ID that bad actors can crawl in ascending order? Do I hash the ID? Do I have a unique slug that requires thought to avoid clashing in the future? Does that add another DB lookup or are you looking up the ID anyway? Do you do /id-slug or /id/slug but if you move to Wordpress or off your stuck with /slug or something with no ID. Maybe none of it matters but it seems like it does, especially if you consider it a change you expect to last the life of the domain. Every tech solution instead of rolling their own has their own unique way of handling it.
- naasking 4y agoIt seems bizarre to me that URLs should matter for SEO. We have hypermedia for that. URLs should technically be opaque and make sense only to the server.
- ape4 4y ago(as far as I know) URNs didn't catch on much https://en.wikipedia.org/wiki/Uniform_Resource_Name https://en.wikipedia.org/wiki/Uniform_Resource_Name