mkdocs-redirects
A MkDocs plugin for dynamic page redirects to prevent broken links
What it is and what it does
mkdocs-redirects is a plugin for MkDocs that automatically generates HTTP redirect pages when documentation files are moved or renamed. During the build process, it creates .html files at the old file paths that redirect browsers to the new locations, preventing broken links when documentation structure changes.
You configure redirects declaratively in mkdocs.yml using a redirect_maps dictionary, where keys are original markdown file paths and values are either new markdown paths or external URLs. The plugin handles URL resolution automatically, respecting MkDocs' use_directory_urls setting to generate correct relative or absolute redirect targets. It also produces warnings if redirect targets don't exist, which is useful when strict mode is enabled.
Use it for:
- Reorganizing documentation structure without breaking existing external links or bookmarks to old pages.
- Migrating documentation to a new domain or external platform while maintaining backward compatibility.
- Renaming or moving individual pages within a growing documentation site without losing SEO or user navigation.
- Consolidating duplicate pages by redirecting old versions to a canonical new location.
- Handling documentation refactors where entire directory hierarchies are restructured.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A MkDocs plugin that generates HTTP redirects for moved or renamed documentation pages, mapping old markdown file paths to new locations or external URLs.
Yes. The plugin is production-stable (Development Status 5), actively maintained, has no known vulnerabilities, and solves a common documentation management problem with minimal dependencies. Install it if you maintain MkDocs documentation and anticipate or have already restructured pages; it's low-friction and permissively licensed.
Install
mkdocs-redirects on PyPI
pip
pip install mkdocs-redirectsuv
uv add mkdocs-redirectspoetry
poetry add mkdocs-redirectsInstalling mkdocs-redirects
Before you install
Low install friction: pure Python wheel with only mkdocs and properdocs as runtime dependencies. Actively maintained with a recent release (139 days ago) and ongoing repository activity.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open-source and commercial projects.
Quickstart
pip install mkdocs-redirects
# In mkdocs.yml:
plugins:
- redirects:
redirect_maps:
'old.md': 'new.md'
'old/file.md': 'http://external.url.com'
Requires MkDocs to be installed and a mkdocs.yml configuration file to specify redirect mappings.
Verify before relying
- Whether properdocs is a required runtime dependency or an optional feature—the fact sheet lists it but does not clarify its role.
- How the plugin handles redirect chains (old → intermediate → final) or circular redirects.
- Performance impact when redirect_maps contains hundreds or thousands of entries.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — mkdocs, properdocs |
| Maintenance | actively maintained — 139 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,683,733/month — #3,656 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mkdocs_redirects-1.2.3-py3-none-any.whl
Keywords: mkdocs, mkdocs-plugin, redirect
Tags
More Documentation packages
Docutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
SphinxSphinx generates professional documentation…
permissive · top 1,000 on PyPI
griffeGriffe extracts the complete structure and…
permissive · top 1,000 on PyPI
sphinxcontrib-serializinghtmlA Sphinx extension that outputs documentation…
permissive · top 1,000 on PyPI
alabasterAlabaster is a clean, responsive Sphinx theme…
permissive · top 1,000 on PyPI
sphinxcontrib-htmlhelpA Sphinx extension that generates HTML help…
permissive · top 1,000 on PyPI
mikemike deploys multiple versions of…
permissive · top 5,000 on PyPI
mkdocs-multirepo-pluginMerges documentation from multiple Git…
permissive · top 15,000 on PyPI
mkdocs-include-markdown-pluginA MkDocs plugin that includes content from…
permissive · top 15,000 on PyPI
mkdocs-same-dirA ProperDocs plugin that allows placing the…
permissive · top 15,000 on PyPI
mkdocs-gen-filesMkDocs plugin that generates documentation…
permissive · top 5,000 on PyPI
mkdocs-autorefsA MkDocs plugin that automatically creates…
permissive · top 5,000 on PyPI
mkdocs-htmlproofer-pluginA MkDocs plugin that validates URLs and anchors…
permissive · top 15,000 on PyPI
mkdocs-literate-navMkDocs plugin that lets you define site…
permissive · top 5,000 on PyPI
sphinx-reredirectsSphinx extension that generates HTML redirect…
unclear · top 5,000 on PyPI
sphinxext-rediraffeA Sphinx extension that automatically redirects…
permissive · top 15,000 on PyPI