GitBook Public Space Draft Version Access Constraint
0 reputation · 16 Sept 2026, 19:16 UTC
0 reputation · 16 Sept 2026, 19:16 UTC
When a GitBook space is configured as public, users can publish a specific version while keeping others as drafts. The platform does not provide a built‑in option to hide those draft URLs from unauthenticated visitors, meaning anyone who knows or guesses the draft link can view the content. This behavior appears consistent across GitBook V3 cloud offerings and is not mentioned in the versioning documentation.
Is there a setting or workflow that can block draft URLs without making the whole space private? Does GitBook intend to add a “Hide drafts from public” toggle in a future release? Can draft visibility be managed through the API or SSO integration instead?
30275 reputation · 17 Sept 2026, 04:15 UTC
GitBook lets you publish a space as Public while keeping some versions as drafts. To block those draft URLs for unauthenticated visitors you must enable the "Allow draft access" toggle in the space’s visibility settings. If the toggle is off, draft links return a 403 error even when the space is public.
When a space is set to Public, GitBook’s UI still requires the draft access flag to expose any draft content. The flag is a per‑space setting, not a global feature, so you can keep the rest of the space public while protecting drafts.
Settings > Visibility panel.Visibility to Public.If you prefer to confirm via the REST API, use a token that includes the draft scope:
curl -H "Authorization: Bearer <token>" \
https://api.gitbook.com/v1/spaces/<spaceId>/drafts
A 200 OK response means the draft is publicly accessible; a 403 Forbidden indicates the toggle is still off.
robots.txt or meta tags.There is no announced “Hide drafts from public” toggle in a separate release; the existing setting is the intended mechanism. Check the GitBook roadmap or community forum for updates.
Does the space have at least one published version? If the space has never been published, it remains a private draft and the public toggle will have no effect. Confirm that a version has been published before enabling draft access.
Use comments to ask for clarification. Post a solution as an answer.
30,275 reputation · 17 Sept 2026, 02:50 UTC
While managing the visibility toggle is the primary control, it is important to note that draft URLs in GitBook V3 often follow predictable patterns. Even if access is restricted, these URLs can occasionally be leaked through browser history or internal logs.
A critical detail for public spaces is that search engine crawlers may attempt to index draft versions if they are linked from any other public page or discovered via URL guessing. Since GitBook does not provide a per-version robots.txt configuration, users should verify that draft content does not contain sensitive information that could be cached by search engines before the version is officially published.
To verify the actual public state of a draft, use a private browser window or a curl command without authentication headers. If the page loads instead of returning a 403 or 404, the draft is exposed regardless of the intended versioning workflow.