Links To Your Static Resources Are Forever

I just got a couple of comments on stackoverflow that the links in my answers are broken. They were all about spring answers, and it appeared spring have changed the URL structure for their documentation. I don’t know when exactly this had happened, but it has. Now, that’s a dumb thing to do if you are even a remotely popular framework/product. Especially with the existence of stackoverflow, “one does not simply change their documentation URLs”.

This is not just about documentation of softhware products – it’s about all static resources (this is used for assets like js and css, but here I mean documentation, descriptions, etc.). People link to these things in their comments in forums, Q&A sites and bookmark them. So you should not return 404 for a page that once worked. Now, this is not possible for every page, of course. But the pages that people are most likely to link to have to remain accessible via the original URL. It lives on the internet. By the way, it is good to have /latest documentation, otherwise we will be stuck on old versions in the top google results (Java 1.4 still appears on top). Some may say “But my original URL structure was stupid”. Fair enough, then 301 to your new page. And if you don’t do 301, each time you change a URL of something “linkworthy”, consider the link rot you are causing. And if you do it, you should be like that:

I just got a couple of comments on stackoverflow that the links in my answers are broken. They were all about spring answers, and it appeared spring have changed the URL structure for their documentation. I don’t know when exactly this had happened, but it has. Now, that’s a dumb thing to do if you are even a remotely popular framework/product. Especially with the existence of stackoverflow, “one does not simply change their documentation URLs”.

This is not just about documentation of softhware products – it’s about all static resources (this is used for assets like js and css, but here I mean documentation, descriptions, etc.). People link to these things in their comments in forums, Q&A sites and bookmark them. So you should not return 404 for a page that once worked. Now, this is not possible for every page, of course. But the pages that people are most likely to link to have to remain accessible via the original URL. It lives on the internet. By the way, it is good to have /latest documentation, otherwise we will be stuck on old versions in the top google results (Java 1.4 still appears on top). Some may say “But my original URL structure was stupid”. Fair enough, then 301 to your new page. And if you don’t do 301, each time you change a URL of something “linkworthy”, consider the link rot you are causing. And if you do it, you should be like that: