> For the complete documentation index, see [llms.txt](https://gitbook-open-v2-preview.gitbook.workers.dev/url/gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook-open-v2-preview.gitbook.workers.dev/url/gitbook.com/docs/docs-site/custom-domain/setting-a-custom-subdirectory.md).

# Setting a custom subdirectory

{% hint style="info" %}
This feature is available on the [Ultimate site plan](https://www.gitbook.com/pricing).
{% endhint %}

With a custom subdirectory, you can make your docs site accessible at `example.com/docs`. This is different from a [custom domain](/url/gitbook.com/docs/docs-site/custom-domain.md) which lets you make your docs site accessible at `docs.example.com`.

One reason to do this is so that your docs URL is formatted in a consistent way with your other site URLs. Using a subdirectory may also be beneficial for SEO.

To configure a subdirectory, you'll need to set things up in your website's backend, then finalize the process in your GitBook site settings.

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-type="image">Cover image (dark)</th><th data-hidden data-type="image">Cover image (dark)</th><th data-hidden data-card-cover-dark data-type="image">Cover image (dark)</th></tr></thead><tbody><tr><td>Configuring a subdirectory with Cloudflare</td><td><a href="/pages/YKhnnDBGRdiG0J9NrQ2q">/pages/YKhnnDBGRdiG0J9NrQ2q</a></td><td><a href="/files/cNDCU8Ykl27ZQthgXvCl">/files/cNDCU8Ykl27ZQthgXvCl</a></td><td><a href="/files/A0XGOp4BDPkL62ScLfRL">/files/A0XGOp4BDPkL62ScLfRL</a></td><td><a href="/files/A0XGOp4BDPkL62ScLfRL">/files/A0XGOp4BDPkL62ScLfRL</a></td><td><a href="/files/HM0FsOPWw2bUEqwORRay">/files/HM0FsOPWw2bUEqwORRay</a></td></tr><tr><td>Configuring a subdirectory with Vercel</td><td><a href="/pages/4YDmCzJDaEnyghAUtKuL">/pages/4YDmCzJDaEnyghAUtKuL</a></td><td><a href="/files/0SPPyHkRUU8jz3DhrRnu">/files/0SPPyHkRUU8jz3DhrRnu</a></td><td><a href="/files/4PfSotd6WoWit4gyCcad">/files/4PfSotd6WoWit4gyCcad</a></td><td><a href="/files/4PfSotd6WoWit4gyCcad">/files/4PfSotd6WoWit4gyCcad</a></td><td><a href="/files/wX5dnvisXzuUNmD8nOLQ">/files/wX5dnvisXzuUNmD8nOLQ</a></td></tr><tr><td>Configuring a subdirectory with AWS</td><td><a href="/pages/V84lyzF3H4YEMHlzA2wa">/pages/V84lyzF3H4YEMHlzA2wa</a></td><td><a href="/files/LbBjBevnm2BvX1gU1RaI">/files/LbBjBevnm2BvX1gU1RaI</a></td><td></td><td><a href="/files/Ck2ktsqVtDj9Kk5zriQI">/files/Ck2ktsqVtDj9Kk5zriQI</a></td><td><a href="/files/JtVbcTzLsmcJf8QcpoAm">/files/JtVbcTzLsmcJf8QcpoAm</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook-open-v2-preview.gitbook.workers.dev/url/gitbook.com/docs/docs-site/custom-domain/setting-a-custom-subdirectory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
