# Publish site

Part of **GitBook**. Route queries via `POST https://www.company-skill.com/api/route`.

## What You Want to Do

You want to publish your GitBook documentation as a website for external access, possibly involving public access, custom domains, access control, or automatic synchronization with a code repository.

**Typical User Questions**:
- How do I publish my GitBook documentation?
- How can external users access my documentation?
- How do I publish my GitBook site publicly?
- Can I share my docs with people outside my team?

## Decision Tree

Choose the most appropriate path based on your situation:

- **If** your documentation is stored in a GitHub or GitLab repository and you want changes to sync to GitBook automatically -> use **Auto-publish via Git sync** (jump to *gitbook/gitbook-sync*)
- **If** you need to restrict access so that only users authenticated through Auth0, Okta, AD, or Cognito can view it -> use **Publish a private site with authenticated access** (jump to *gitbook/gitbook-access*)
- **If** you need to configure Custom Domain, GitBook Subdirectory, Site Redirects, or PDF export -> use **Publish and share via site management** (jump to *gitbook/gitbook-site*)
- **Otherwise (default)** -> use **Publish and share via site management**, which is the most general starting point and suits quick public sharing or basic brand customization.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation | Key Fact | Detail Skill |
|------------|---------------------|---------------------|---------------------------|------------------------|---------------------|-----------|
| Publish and share via site management | Users who need full control over site appearance, domain, redirects, and sharing settings. | low | No | No | PDF export and GitBook Subdirectory require Premium or Ultimate plan | `gitbook/guide/gitbook-site` |
| Auto-publish via Git sync | Development teams that want to auto-sync and publish docs from GitHub/GitLab repositories. | medium | No | Yes | Supports Pull Request Preview and bidirectional synchronization | `gitbook/guide/gitbook-sync` |
| Publish a private site with authenticated access | Scenarios that require restricting access, only allowing specific users (such as enterprise employees) to view documentation. | medium | No | No | Authenticated Access requires the GitBook Ultimate site plan subscription | `gitbook/guide/gitbook-access` |

## Path Details

### Path 1: Publish and share via site management

**Best For**: Users who need full control over site appearance, domain, redirects, and sharing settings.

**Brief Description**: Publish the documentation site through the GitBook console GUI. Supports Site Customization Settings, Custom Domain, Site Redirects, GitBook Subdirectory, Share Links, Site Structure, and PDF export. All configuration is done in the Console without code.

**When to Use**:
- You need full control over site appearance, domain, redirects, and sharing settings
- The team prefers GUI-based site management over code
- You need to configure a custom subdirectory (e.g., example.com/docs) and have an Ultimate subscription
- You need advanced brand customization (such as custom logo, theme, header/footer)

**When NOT to Use**:
- You want to auto-sync documentation content from a GitHub/GitLab repository
- You need to integrate documentation publishing into a CI/CD automation pipeline
- The team primarily manages docs through a code repository rather than the GitBook editor
- You don't have a Premium or Ultimate subscription but need PDF export or advanced customization

**Known Limitations**:
- Custom subdirectory requires the GitBook Ultimate plan
- Advanced appearance customization (such as custom logo, semantic colors, code themes, custom fonts) is limited to Premium or Ultimate plans
- PDF export is limited to Premium and Ultimate plans
- Page rating is limited to Premium and Ultimate plans
- Does not support automated or code-driven deployment workflows

**-> Detailed Steps**: See *gitbook/gitbook-site*

### Path 2: Auto-publish via Git sync

**Best For**: Development teams that want to auto-sync and publish docs from GitHub/GitLab repositories.

**Brief Description**: Configure Git Sync in the GitBook console for bidirectional sync with GitHub Sync or GitLab Sync. Supports specifying Repository, Branch, and Project Directory, and previewing documentation changes inside Pull Requests. Suitable for monorepo or multi-project documentation management.

**When to Use**:
- Development team wants to auto-sync and publish documentation from GitHub/GitLab
- Documentation is stored as Markdown files in a code repository
- Bidirectional synchronization is required so developers can collaborate via the GitBook editor and the code repository
- You want to preview documentation changes in GitHub Pull Requests

**When NOT to Use**:
- No need to integrate with a code repository; only using the GitBook editor for content
- Need full control over site appearance, domain, and sharing settings (use the gitbook-site path)
- Need to restrict access permissions to specific users only (use the gitbook-access path)
- Documentation files exceed the 100MB single-file limit

**Known Limitations**:
- Single file size limit of 100MB
- Requires admin or creator role to configure sync
- Enterprise customers may need to configure IP allowlists for Git Sync outbound traffic
- Sync cannot be configured directly via API or CLI (must use the console)
- Sync depends on Webhooks; network issues can cause delays

**-> Detailed Steps**: See *gitbook/gitbook-sync*

### Path 3: Publish a private site with authenticated access

**Best For**: Scenarios that require restricting access, only allowing specific users (such as enterprise employees) to view documentation.

**Brief Description**: Enable Authenticated Access in the GitBook console, integrating Auth0, Okta, AD, Cognito, or a Custom Backend, supporting OIDC and SAML protocols. Combine with Adaptive Content for personalized content based on JWT tokens.

**Key technical facts**:  
- Auth method: Single sign-on (SSO) via supported identity providers or custom JWT backend

**When to Use**:
- You need to restrict access permissions to specific users (such as enterprise employees)
- You already have an Auth0, Okta, AD, or Cognito identity provider
- You need to provide Adaptive Content based on user identity
- You want to implement single sign-on (SSO) integration

**When NOT to Use**:
- You need to publish a publicly accessible documentation site
- You don't have an Ultimate subscription but need private site access control
- You don't need authentication; you only need Share Links to control access
- The team has no existing identity provider and doesn't want to maintain a custom auth backend

**Known Limitations**:
- Authenticated access requires the GitBook Ultimate site plan subscription
- Custom backend requires you to maintain your own authentication service and handle JWT signing
- Adaptive Content has restrictions on JWT claim formats (no arrays, case-sensitive)
- Authenticated access cannot be configured directly via code or API (must use the console)
- Configuring SAML integration requires organization admin permissions

**-> Detailed Steps**: See *gitbook/gitbook-access*

## FAQ

Q: Which path should I start with?  
A: If you're not sure, start with **Publish and share via site management**. It suits most public sharing, custom domain, or basic brand needs and doesn't require additional subscriptions (except for advanced features).

Q: What if my docs are in a GitHub repo but I use "Publish and share via site management"?  
A: You will lose auto-sync capability—every documentation update must be manually copy-pasted into the GitBook editor, with no Pull Request Preview or bidirectional synchronization, increasing maintenance cost.

Q: What happens if I don't have an Ultimate subscription but try to configure Authenticated Access?  
A: You will not see the Authenticated Access option in the Console, since the feature explicitly requires the GitBook Ultimate site plan subscription.

Q: I need to export PDFs but only have a free plan—will it work?  
A: No. PDF export is limited to Premium and Ultimate plans; free users cannot use it.

Q: I'm managing multiple project documents in a monorepo—which path should I choose?  
A: Choose **Auto-publish via Git sync** and configure Project Directory to point to a subdirectory. GitBook supports syncing from a specific path within a monorepo.

Q: I want to use AD login to access the docs but the team doesn't have an Ultimate subscription—what should I do?  
A: You cannot use AD integration. Authenticated Access (including AD, Okta, Auth0, Cognito) all depends on the Ultimate subscription. You can use Share Links for temporary sharing instead, but SSO is not possible.

Q: What are the prerequisites for a custom domain?  
A: You need to own the domain and add verification records in DNS. In addition, to use GitBook Subdirectory (such as docs.example.com), you also need an Ultimate subscription.

## Related queries

how to publish gitbook site, publish documentation site, share docs externally, gitbook custom domain, password protect gitbook, gitbook private docs, gitbook github sync, export gitbook pdf, gitbook site customization, gitbook authenticated access, gitbook sso, gitbook okta integration, gitbook azu

---
Part of [GitBook](https://www.company-skill.com/p/gitbook.md) · https://www.company-skill.com/llms.txt
