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:
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 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)
@aral ohh! Cool! Have fun!
@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)
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!