Site redirects
Set up site redirects to route traffic to content anywhere on your site
Last updated
Set up site redirects to route traffic to content anywhere on your site
Last updated
Redirects are commonly used when you are migrating your documentation from one provider to another — like when you just moved docs to GitBook. Broken links can impact SEO so we recommend setting up redirects where needed.
In addition to automatic redirects created by GitBook, you can create a redirect from any path in your site’s domain.
Click Add redirect to begin. 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 to your site. Click Add to create the redirect.
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.
To delete a redirect, press the Delete redirect button and confirm.
Whenever pages are moved or renamed, their canonical URL changes with them. In order to keep your content accessible, GitBook automatically creates a HTTP 301 redirect from the old URL to the new one.
Every time a URL is loaded, GitBook resolves it through the following steps:
Site content is resolved to its canonical URL by following any of the automatically created redirects.
If the URL cannot be resolved, the URL is checked against space-level redirects, defined in your repository's .gitbook.yaml
file.
Finally, the URL is checked against site-level redirects, created via the process above.
To get started, view your site’s dashboard in GitBook and click Settings in the top-right corner. Scroll down to the Redirects section.
To edit a redirect, press the Edit icon next to it in the list. Update the redirect and hit Save.