Some pages across the web were linking to the blog in ways that would return 404. This PR updates and restructures how redirects work for the blog, with the goal of the redirecting, using Vercel rules, to support 3 basic usecases:
Requests to /research or /writings should redirect to the front page
Requests to /research/:slug or /writings/:slug should strip the first section and redirect to /:slug
Requests to /the-cost-of-resiliencea redirect to /the-cost-of-resilience - this is apparently a common broken URL found in the wild, and the SEO guide suggests setting up the redirect to not lose the SEO power
Using Vercel rules means better support for correct HTTP status codes, so we no longer need the useRedirect custom component, which has been removed.
Some pages across the web were linking to the blog in ways that would return 404. This PR updates and restructures how redirects work for the blog, with the goal of the redirecting, using Vercel rules, to support 3 basic usecases:
/research
or/writings
should redirect to the front page/research/:slug
or/writings/:slug
should strip the first section and redirect to/:slug
/the-cost-of-resiliencea
redirect to/the-cost-of-resilience
- this is apparently a common broken URL found in the wild, and the SEO guide suggests setting up the redirect to not lose the SEO powerUsing Vercel rules means better support for correct HTTP status codes, so we no longer need the
useRedirect
custom component, which has been removed.Task: Broken Backlinks
Following the SEO guide here: https://docs.google.com/spreadsheets/d/13Xa_TKfuKrWzrK0zCgJNnQPXFK95hiBxqnLWE7cvHN8/edit#gid=1086684444