Skip to main content

In docs.json

  • Redirects are permanent by default (HTTP 308); permanent: false uses 307.
  • :name* wildcards match a path suffix and carry it to the destination.

With a _redirects file

Alternatively, ship a _redirects file in your docs folder using the standard one-rule-per-line syntax:
  • Allowed statuses: 301, 302, 303, 307, 308 (anything else is treated as 301; omitted means 301).
  • Exact rules always win over /* splat rules; among splats, the first match wins.
  • A request with a trailing slash falls back to the rule without it.
  • The query string is preserved unless the destination has its own.
Use either docs.json redirects or a _redirects file, not both. When docs.json declares any redirects, the generated rules replace a hand-written _redirects file.

No rule cap

Redirects are evaluated in the site’s edge worker rather than as a static hosting table, so there is no practical limit on the number of rules. Sites with tens of thousands of redirects work fine.

Home-page fallback

If no page maps to /, Docs7 automatically redirects the root to the first page in your navigation.