> For the complete documentation index, see [llms.txt](https://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.com/docs/documentation/ja-gitbook-documentation/docs-site/custom-domain/setting-a-custom-subdirectory.md).

# サブディレクトリを設定する

カスタムサブディレクトリを使うと、ドキュメントサイトを次の場所でアクセス可能にできます： `example.com/docs`。これは次のものとは異なります： [カスタムドメイン](/docs/documentation/ja-gitbook-documentation/docs-site/custom-domain.md) これを使うと、ドキュメントサイトを次の場所でアクセス可能にできます： `docs.example.com`.

これを行う理由の一つは、ドキュメントのURLを他のサイトURLと一貫した形式にできるためです。サブディレクトリの使用は、SEOの面でも有益な場合があります。

サブディレクトリを設定するには、まずウェブサイトのバックエンドで設定を行い、その後GitBookサイト設定でプロセスを完了する必要があります。

<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">カバー画像</th><th data-hidden data-type="image">カバー画像（ダーク）</th><th data-hidden data-type="image">カバー画像（ダーク）</th><th data-hidden data-card-cover-dark data-type="image">カバー画像（ダーク）</th></tr></thead><tbody><tr><td>Cloudflareでサブディレクトリを設定する</td><td><a href="/pages/1a6e743944de82e546f8e7782b6c46af35f1d68b">/pages/1a6e743944de82e546f8e7782b6c46af35f1d68b</a></td><td><a href="/files/b3da1de6f6e179b17a5fd5ecfd16c9167c2f9cac">/files/b3da1de6f6e179b17a5fd5ecfd16c9167c2f9cac</a></td><td><a href="/files/792095fbbe570fa6d705d3dc8a835a2a3f52a7d7">/files/792095fbbe570fa6d705d3dc8a835a2a3f52a7d7</a></td><td><a href="/files/792095fbbe570fa6d705d3dc8a835a2a3f52a7d7">/files/792095fbbe570fa6d705d3dc8a835a2a3f52a7d7</a></td><td><a href="/files/491fda09719ba95369812c6e1f01b1af980845f9">/files/491fda09719ba95369812c6e1f01b1af980845f9</a></td></tr><tr><td>Vercelでサブディレクトリを設定する</td><td><a href="/pages/263f9008545b4deb6944f2fb31df89575e8ec79d">/pages/263f9008545b4deb6944f2fb31df89575e8ec79d</a></td><td><a href="/files/5ff2dfa7d74a0cbf380b6016dbd941deeb49ae6e">/files/5ff2dfa7d74a0cbf380b6016dbd941deeb49ae6e</a></td><td><a href="/files/ca49f2d845b922ab6a230901454edbc722c4b06f">/files/ca49f2d845b922ab6a230901454edbc722c4b06f</a></td><td><a href="/files/ca49f2d845b922ab6a230901454edbc722c4b06f">/files/ca49f2d845b922ab6a230901454edbc722c4b06f</a></td><td><a href="/files/631073565c1de082068a4e316e8f4df8bae1a4d6">/files/631073565c1de082068a4e316e8f4df8bae1a4d6</a></td></tr><tr><td>AWSでサブディレクトリを設定する</td><td><a href="/pages/50f9eeed3e592ddc003a9793ea7bd8de3484abbc">/pages/50f9eeed3e592ddc003a9793ea7bd8de3484abbc</a></td><td><a href="/files/448c69d273a9dd339e21c62a6e77bc8b14782a95">/files/448c69d273a9dd339e21c62a6e77bc8b14782a95</a></td><td></td><td><a href="/files/98ed666a52c4f5f2205d3c01c9a5e142f2e8811b">/files/98ed666a52c4f5f2205d3c01c9a5e142f2e8811b</a></td><td><a href="/files/f3f725b47222aae3ad8fc5355dd9d043a6a8feaf">/files/f3f725b47222aae3ad8fc5355dd9d043a6a8feaf</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, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/documentation/ja-gitbook-documentation/docs-site/custom-domain/setting-a-custom-subdirectory.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
