404 β†’ 307

🌲 A simple gesture for an evergreen web.

Get started!

  1. Serve your current site from a subdomain (e.g., 2017.your.site).

  2. Add the 404 to 307 rule for your server (see below) to the latest version of your site to forward links that are not found on the latest version to the previous version.

  3. If you change the site again in the future, rinse and repeat.

Kitten

Kitten natively understands 404 to 307. Just add the following to your kitten.json:

kitten.json

{
  "4042307": "https://2017.your.site"
}

For more information, see the 404 β†’ 307 section in the Kitten documentation and the 404 β†’ 307 Kitten example.

nginx

In your site configuration:

server {
  # …
  location / {
    error_page 404 =307 https://2017.your.site$request_uri;
    try_files $uri $uri/ =404;
  }
}

For example, if your site uses Let’s Encrypt on Ubuntu, you should find your site configuration file in /etc/nginx/sites-available/https.conf.

WordPress

Fabrica Evergreen Web is a tiny plugin which allows you to use 404 β†’ 307 on WordPress sites. After installation and activation, you specify the fallback path on the settings page.

Contribute

Edit this page on Codeberg to contribute 404 β†’ 307 configurations for your favourite servers and platforms and send a pull request.

If you’re having trouble, please feel free to open an issue.

πŸ’• Like this? Fund us!

Small Technology Foundation is a tiny, independent not-for-profit.

We’re building the Small Web.

We exist in part thanks to patronage by people like you. If you share our vision and want to support our work, please become a patron or donate to us today and help us continue to exist.