related | |
---|---|
|
All books on Gitbook.com are served under http://{author}.gitbooks.io/{book}/
, the book's content is available at http://{author}.gitbooks.io/{book}/content/
.
But you can also tell GitBook.com to serve your content under a custom domain. Custom domains are great to maintain branding or integrate documentation into your website.
Adding a custom domain is easy:
Go to your book's Settings tab and then click on Domains. Then simply enter your domain and save. You should see an alert, informing you that your CNAME is not properly configured. Proceed to the next steps to properly configure it.
To finish the setup you will need to make a few changes with your domain registrar:
-
Login to your domain registrar and find the page that allows you to add/edit host records. That page is often found in your settings under
Edit DNS
,Host Records
orZone File Control
. -
Set the
www
record to a CNAME and set the URL field to:www.gitbooks.io
. -
To redirect the naked domain (
yourdomain.com
) towww.yourdomain.com
, you'll need to enable "domain forwarding". This is often found underForwarding
,URL Forwarding
orURL Redirect
.
That's all ! It might take a few hours for the new DNS settings to propagate. After that, go back to your book's Domains settings to check that everything is OK: