skillfed

mkdocs-redirects

A MkDocs plugin for dynamic page redirects to prevent broken links

mkdocs-redirects v1.2.3 1.7M downloads/30d#3,656 on PyPI3
Permissive license MIT Active released

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-redirects

uv

uv add mkdocs-redirects

poetry

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 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: Web EnvironmentIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DocumentationTopic :: Software Development :: DocumentationTopic :: Text Processing :: Markup :: MarkdownTyping :: Typed

Tags

mkdocs page redirectsdocumentation link migrationmkdocs broken link fixredirect old documentation pagesmkdocs url mappingprevent broken doc linksmkdocs page rename handling
mkdocs-plugindocumentation-maintenanceurl-redirect

More Documentation packages

docutils

Docutils converts plaintext documentation in…

unclear · top 1,000 on PyPI

Sphinx

Sphinx generates professional documentation…

permissive · top 1,000 on PyPI

griffe

Griffe extracts the complete structure and…

permissive · top 1,000 on PyPI

sphinxcontrib-serializinghtml

A Sphinx extension that outputs documentation…

permissive · top 1,000 on PyPI

alabaster

Alabaster is a clean, responsive Sphinx theme…

permissive · top 1,000 on PyPI

sphinxcontrib-htmlhelp

A Sphinx extension that generates HTML help…

permissive · top 1,000 on PyPI

mike

mike deploys multiple versions of…

permissive · top 5,000 on PyPI

mkdocs-multirepo-plugin

Merges documentation from multiple Git…

permissive · top 15,000 on PyPI

mkdocs-include-markdown-plugin

A MkDocs plugin that includes content from…

permissive · top 15,000 on PyPI

mkdocs-same-dir

A ProperDocs plugin that allows placing the…

permissive · top 15,000 on PyPI

mkdocs-gen-files

MkDocs plugin that generates documentation…

permissive · top 5,000 on PyPI

mkdocs-autorefs

A MkDocs plugin that automatically creates…

permissive · top 5,000 on PyPI

mkdocs-htmlproofer-plugin

A MkDocs plugin that validates URLs and anchors…

permissive · top 15,000 on PyPI

mkdocs-literate-nav

MkDocs plugin that lets you define site…

permissive · top 5,000 on PyPI

sphinx-reredirects

Sphinx extension that generates HTML redirect…

unclear · top 5,000 on PyPI

sphinxext-rediraffe

A Sphinx extension that automatically redirects…

permissive · top 15,000 on PyPI