Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions create/redirects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
]
```

This permanently redirects `/source/path` to `/destination/path` so that you don't lose any previous SEO for the original page.

Check warning on line 22 in create/redirects.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/redirects.mdx#L22

Spell out 'SEO', if it's unfamiliar to the audience.

To match a wildcard path, use `*` after a parameter. In this example, `/beta/:slug*` matches `/beta/introduction` and redirects it to `/v2/introduction`.

Expand All @@ -32,12 +32,40 @@
]
```

### Partial wildcard patterns

Use partial wildcards to match URL segments that start with a specific prefix. Add `*` at the end of a prefix to capture the remaining portion of that segment.

```json
"redirects": [
{
"source": "/en/articles/9140627-*",
"destination": "/collections/overview"
}
]
```

This redirects any path like `/en/articles/9140627-how-to-create-collections` or `/en/articles/9140627-getting-started` to `/collections/overview`.

To preserve the captured portion in the destination, use the same partial wildcard pattern:

```json
"redirects": [
{
"source": "/old/article-*",
"destination": "/new/article-*"
}
]
```

This redirects `/old/article-123` to `/new/article-123`, substituting the captured value (`123`) into the destination.

## Broken links

Catch broken links with our CLI. [Install the CLI](/installation) and run the command:

Check warning on line 65 in create/redirects.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/redirects.mdx#L65

Try to avoid using first-person plural like 'our'.

Check warning on line 65 in create/redirects.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/redirects.mdx#L65

Use 'command-line tool' instead of 'CLI'.

```bash
mint broken-links
```

The CLI identifies any relative links in your docs that don't exist.

Check warning on line 71 in create/redirects.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/redirects.mdx#L71

Use 'command-line tool' instead of 'CLI'.