Custom hostnames

Serve your GitBook content from fully branded, custom hostnames.

Extend your brand identity by mapping personalized domain names to your docs. This can help unify your documentation site with your existing company properties.

The CustomHostname object

Attributes
objectstring · enumRequiredPossible values:
hostnamestring · max: 512Required

Custom hostname for the site, for e.g. docs.mycompany.com

Pattern: ^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$
targetone ofRequired
or
isActivebooleanRequired
statusone ofOptional
string · enumOptionalPossible values:

The CustomHostname object

Get a custom hostname

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
hostnamestringRequired

The custom hostname, for example "docs.gitbook.com"

Responses
200

OK

application/json
get
/custom-hostnames/{hostname}
200

OK

Remove a custom hostname

delete

The custom hostname will continue to point to the content or organization unless it is used for another one.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
hostnamestringRequired

The custom hostname, for example "docs.gitbook.com"

Responses
delete
/custom-hostnames/{hostname}

No content

Revalidate a custom hostname DNS

patch

Revalidate DNS records and status.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
hostnamestringRequired

The custom hostname, for example "docs.gitbook.com"

Responses
patch
/custom-hostnames/{hostname}

No content

Last updated

Was this helpful?