How does GitBook handle SEO?

Thanks to the following features, your GitBook projects are SEO-friendly with little or no configuration on your end:

Responsive design

All content is suitable for mobile devices, tablets, laptops and desktops! The design for your published documentation will adapt based on the size of the device it is being viewed on.

SEO-friendly content
  • URLs are set based on each page’s title by default, but can be customized as you wish.

  • We avoid duplicate content through smart, canonical URLs.

  • The HTML title and Open Graph title are based on the page and space title.

  • The meta description and Open Graph description are based on the page description.

  • Alt text can be added to images, which is also very important for accessibility.

  • HTML sent to crawlers is pre-rendered (i.e. server-side), meaning that crawlers do not need JavaScript to index your content.

Note that we don’t generate keyword meta tags, because modern search engines do not use them to rank pages. This was officially confirmed by Google in 2009.

Sitemap

Provided that your space is published with a setting other than unlisted, we automatically generate a sitemap.xml file based on your table of contents. You can locate this by going to the first page of your documentation and then appending /sitemap.xml to the URL. For example, the first page of our documentation is located at docs.gitbook.com, and so our sitemap.xml file is located at docs.gitbook.com/sitemap.xml.

Custom domain

If you prefer, you can set a custom domain for your documentation. (e.g. docs.example.com instead of yourorganization.gitbook.io)

Caching & CDN

All published content is cached and served via our global CDN (content delivery network). This helps to improve performance, which is an important factor within SEO.

Even with these great features, it could still take some time before your documentation is indexed by Google (and other search engines). Both we and you have no direct control over this, but there are two things that you could do to help improve the chance of getting your content indexed more quickly:

  1. Make sure that there are links to your GitBook space from other websites that have already been indexed by Google. As Google will return to re-index these sites from time to time, this increases the chance that they’ll find your space as a result of re-indexing one of these other sites.

  2. Try submitting your site to Google, which essentially asks them to index it. For GitBook spaces, this will only be possible if you are using a custom domain for your space and if you create a TXT DNS record to confirm ownership of the domain.

Redirects

Moving your content to GitBook or changing its structure? Broken links can impact your SEO. Read how to set up redirects in GitBook.

Note: Whenever you move or rename a page within GitBook, its canonical URL also changes. To keep your content accessible, GitBook automatically creates a HTTP 301 redirect from the old URL to the new one. Find out more about how automatic redirects work on our redirects page.

Last updated