Site redirects are available on Premium and Ultimate plans.
Managing redirects on your site
To get started, view your site’s dashboard in GitBook and open the Settings tab, then click Domain & redirects.Creating redirects
1
Add redirect
Click Add redirect and select the Manual option.
2
Configure source and destination
Fill in the source path — i.e. the URL slug that you wish to redirect somewhere else — and the destination content you wish to link to. You can pick any section, variant, or page on your site. Click Add to create the redirect.
- /docs/* to match everything under /docs/
- /changelog* to match paths that start with /changelog
- On: the part matched by * is appended to the destination path.
- Example: source /docs/* → destination /help
/docs/install redirects to /help/install
- Example: source /docs/* → destination /help
- Off: all matched URLs redirect to the same fixed destination.
- Example: source /docs/* → destination /help
/docs/install redirects to /help
- Example: source /docs/* → destination /help
If you want to add another redirect to the same page, you can toggle the Add another redirect option on before you hit Add. When you add your redirect, the modal will remain open with the destination content set to the previous selection so you can add another URL slug immediately.
Editing redirects
To edit a redirect, press the Edit icon next to it in the list. Update the redirect and hit Save. To delete a redirect, press the Delete redirect button and confirm.Import redirects from a CSV
Click Add redirect and choose Upload CSV. Upload a CSV with exactly two columns named: source and destination:- The source is the path you want to redirect (for example, /docs/site-redirects)
- The destination can be:
- A specific page: use the page’s admin URL
- An external URL
- An empty string (""): removes the redirect for that source
About automatic redirects
Whenever pages are moved or renamed, their canonical URL changes with them. In order to keep your content accessible, GitBook automatically creates a HTTP 307 redirect from the old URL to the new one. Every time a URL is loaded, GitBook resolves it through the following steps:1
Resolve canonical URL
Site content is resolved to its canonical URL by following any of the automatically created redirects.
2
Check space-level redirects
If the URL cannot be resolved, the URL is checked against space-level redirects, defined in your repository’s
.gitbook.yaml file.3
Check site-level redirects
Finally, the URL is checked against site-level redirects, created via the manual process described above.