Follow

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:

4042302.org

mastodon.ar.al/media/l-ma3skWz

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.)

Show thread

Right, now serving a downloaded copy of my Geocities site instead of hitting @internetarchive directly so the examples on 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 :)

Show thread

@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 :)

@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 :)

@aral

This is a perfect use case for practical application of the current level of #automation tools.

There is a lot of #database-/#fileManagement related #maintenance tasks in need of "AI"-powered #controlpanel #middleware / #plugins automation.

("#AI" is overhyped, so I prefer labelling it "Finally-Flexible-Features-For-Increased-Automation", or #F4iA ("for-aye" :-).)

#ITstrategy
#development
#perspective

@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?

@trwnh Correct (and yes, it terminates with a 404 on the oldest version of the site. On 4042302.org, that’s the “a page that never existed” link.)

Please do let me know if you have any suggestions on how I can phrase it so that it’s clearer :)

@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 Thanks again for the nudge and the suggestions. I just tweaked the site, taking your suggestions in to consideration. Hope it’s a bit easier to follow now: 4042302.org

@aral i really think having multiple error_page listings would be easiest (on the homepage + on the how page)

something like

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

Sign in to participate in the conversation
Aral’s Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!