Redirects
Redirect sources cannot include URL anchors like
path#anchor or query parameters like path?query=value. Destinations may include anchors (e.g. /destination/path#section).redirects field to the top level of your docs.json file to set up redirects.
docs.json
/source/path to /destination/path.
By default, redirects are permanent (308). To use a temporary redirect (307), set permanent to false.
Wildcard redirects
To match a wildcard path, use* after a parameter. In this example, /beta/:slug* matches /beta/introduction and redirects it to /v2/introduction.
Partial wildcard redirects
Use partial wildcards to match URL segments that start with a specific prefix./articles/concepts- path, such as /articles/concepts-getting-started and /articles/concepts-overview, and redirects them all to /collections/overview.
You can also substitute the captured wildcard value in the destination.
/old/article-123 to /new/article-123, preserving the captured value after the prefix.
Avoid infinite redirects
To avoid infinite loops, do not create circular redirects where paths redirect back to each other.When redirects take effect
Redirects indocs.json apply at request time on Mintlify’s hosting layer, so they go live as soon as your changes are deployed. Preview deployments apply redirects too, which lets you verify behavior before merging to your production branch.
To test redirects locally, run mint dev and visit the source path in your browser. The local dev server applies the redirects defined in your docs.json.