--- id: mkdocs-redirects version: "1.2.3" license: MIT license_treatment: permissive maintenance: active --- # mkdocs-redirects — A MkDocs plugin for dynamic page redirects to prevent broken links License: permissive · Maintenance: active · Downloads: 1.7M/mo ## 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 above — 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 pip install mkdocs-redirects uv add mkdocs-redirects poetry add mkdocs-redirects ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 1.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags mkdocs page redirects, documentation link migration, mkdocs broken link fix, redirect old documentation pages, mkdocs url mapping, prevent broken doc links, mkdocs page rename handling, mkdocs-plugin, documentation-maintenance, url-redirect [View on SkillFed](https://skillfed.io/packages/mkdocs-redirects) · [View on PyPI](https://pypi.org/project/mkdocs-redirects/)