Post with 301 redirects

Par

URLs usually change over time, as you use another CMS or optimizye your file structure.

A 301 is used when a page has permanently changed location.
Informing about this change is indispensable if you want to keep your incoming links working, be it from organic Google search or other pages that have linked to your content.

Aleksandr Hovhannisyan came up with an elegant solution for Eleventy and Netlify. To directly cover several possible previous routes it is created as an array. You can find the loop in _redirects.njk.

Usage

Frontmatter:
---
redirectFrom: ['/old-route/', '/optionally-another-old-route/']
---