404 → 302
A simple gesture for an evergreen Web.
What if links never died? What if we never broke the Web? What if it didn’t involve any extra work?
It’s possible. And easy.
Just make your 404s into 302s.
Thoughts, suggestions, and contributions welcome:
@aral Interesting idea! Simple and effective. Thank you 😀
@aral Is the redirect possible for Apache as well? I maintain my own domain and server, but I'm no expert in the web server stuff. If at all possible, could you please provide the documentation for Apache as well?
@masoud Indeed, the same technique will work. My hope is that others will contribute the necessary configurations for other platforms (I don’t use Apache). I’m sure someone will soon :)
@masoud Thanks, Masoud!
@amenthes Thanks for reminding me. Now added as a link to the front page. (Issue: https://source.ind.ie/indienet/4042302/site/issues/1)
PS. Looks like archive.org tried to index the missing page and so the final 404 now forwards to Yahoo Domains! 🤦
(I’m currently downloading a local copy of my old Geocities page so I can serve – and back it up – myself and I’ll update the link in the example once that’s ready. Also flying to Belgium today to kickstart a very exciting project that we’re collaborating on with the City of Ghent so apologies if it’s not fixed immediately.)
@aral ohh! Cool! Have fun!
@aral I really like the message of trying to get web publishers to think about creating their own archives, instead of relying on the Internet Archive https://blog.archive.org/2013/10/24/web-archive-404-handler-for-webmasters/ A distributed web needs a distributed archive, and many different types of archives.
The first step of "Backup your current site to a subdomain" is the hardest part I think. While it's relatively easy for a static site, what does it mean for a dynamic web application?
@inkdroid It was badly worded, I didn’t mean backup as in a static backup, I meant “serve your old site from a different subdomain.” So, even for dynamic sites, mostly a trivial DNS change. The use case doesn’t really extend to pages that require a login.
@aral if the host name is simply an alias to the current website how is that an archive — how can its contents persist after the main site changes or has content deleted from it?
Right, now serving a downloaded copy of my Geocities site instead of hitting @internetarchive directly so the examples on https://4042302.org should all work perfectly now.
Also: testament to how quickly you can set up a different version of your site with this technique :)
@aral Hah, the number of times I explained it to site administrators who replied (sniggered, even) that no one ever bookmarks a page. And then ignored me completely. Thousands of resources moved and were never found again.
@aral I'll look into making this work with Netlify and Caddy. Sound very cool! :)
@cemk That would be awesome :) The Netlify folks are very supportive/friendly. I was thinking of talking to them too :)
This is a perfect use case for practical application of the current level of #automation tools.
@aral this is an interesting idea, redirecting to previous versions. Could that be automated using web.archive.org perhaps?
@aral silent failure will only confuse people. it's much better to give an indication of failure. i hate when I just get dumped unceremoniously to a home page, with no indication of anything going wrong.
@trwnh I agree, silent failure is very confusing. That’s why this technique doesn’t fail silently. If a URL cannot be found in any version of the site, a 404 is given.
@aral it seems there's an implicit assumption that any unfound link will necessarily exist somewhere further back, cascading through previous versions of the site -- is this correct? and if it was malformed, then it will be served a standard 404 on the oldest site?
@aral well, the landing page makes it seem that ALL 404s become 302s. the nginx snippet doesn't really clarify which server it applies to; perhaps either include an additional 1997.4042302.org redirect or include the server block's name as 4042302.org? perhaps three tiny server block snippets to further illustrate the * > 2017 > 1997 > 404.html cascade?
@trwnh Thank you, will review :)
@clacke Thank you; fixed :)
@aral i really think having multiple error_page listings would be easiest (on the homepage + on the how page)
server ( # 4042302.org
location / (
error_page 404=302 2017.4042302.org
server ( #2017.4042302.org
location / (
error_page 404=302 1997.4042302.org
server ( #1997.4042302.org
location / (
error_page 404 /404.html
@trwnh Noted, thanks. Will improve when I get a moment (https://source.ind.ie/indienet/4042302/site/issues/2)
This is my personal Mastodon.