Configurations
Redirects and Broken Links
Tools to help prevent invalid links
When you change the path of a file in your docs folder, it will also change the path of the URL to that page. This may happen when restructuring your docs or changing the sidebar title.
Broken Links
Catch broken links with our CLI. Simply install the CLI and run the command:
mintlify broken-links
The CLI will identify any relative links in your docs that don’t exist.
Redirects
Set up 301 redirects by adding the redirects
field into your mint.json
file.
"redirects": [
{
"source": "/source/path",
"destination": "/destination/path"
}
]
This will permanently redirect /source/path
to /destination/path
so that you don’t lose any previous SEO for the original page.
To match a wildcard path, use *
after a parameter. In this example, /beta/:slug*
will match /beta/introduction
and redirects it to /v2/introduction
.
"redirects": [
{
"source": "/beta/:slug*",
"destination": "/v2/:slug*"
}
]
Was this page helpful?