> 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/publish/custom-domain/setting-a-custom-subdirectory.md).

# カスタムサブディレクトリの設定

ドキュメントサイトにカスタムサブディレクトリを設定します

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

これを行う理由の1つは、ドキュメントの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="/docs/documentation/ja-gitbook-documentation/publish/custom-domain/setting-a-custom-subdirectory/configuring-a-subdirectory-with-cloudflare.md">Cloudflare でサブディレクトリを設定する</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FGYtERTwSsUtqY1crFSnk%2FCloudflare.png?alt=media&amp;token=c4aadcb8-d16e-47d2-ad33-56d137ddbd99">25_12_10_cloudflare_1.png</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2F3zWvv4mOHebRyQB34CHx%2FCloudflare.svg?alt=media&amp;token=f4109747-5c4d-4039-8b33-168569f41d9d">25_08_29_cloudflare.svg</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2F3zWvv4mOHebRyQB34CHx%2FCloudflare.svg?alt=media&amp;token=f4109747-5c4d-4039-8b33-168569f41d9d">25_08_29_cloudflare.svg</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FRQMKddJVVyo47jdleeyw%2FCloudflare.png?alt=media&amp;token=0f117eb3-2270-48c5-b622-e971374b7a5a">25_12_10_cloudflare.png</a></td></tr><tr><td>Vercelでサブディレクトリを設定する</td><td><a href="/docs/documentation/ja-gitbook-documentation/publish/custom-domain/setting-a-custom-subdirectory/configuring-a-subdirectory-with-vercel.md">Vercel でサブディレクトリを設定する</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2F6vihVGnoaGJIK47oiPIt%2FVercel.png?alt=media&amp;token=52cba085-83bf-4aca-9d5f-9a61141e6ec7">25_12_10_vercel_1.png</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2F4Dra7NQYfLaHJdhBTful%2FVercel.svg?alt=media&amp;token=e53c02a9-86fe-4ddc-8585-5cd0cef82ed4">25_08_29_vercel.svg</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2F4Dra7NQYfLaHJdhBTful%2FVercel.svg?alt=media&amp;token=e53c02a9-86fe-4ddc-8585-5cd0cef82ed4">25_08_29_vercel.svg</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FuO2stsXgYy2m3MOndCtz%2FVercel.png?alt=media&amp;token=6719d901-d0d4-4eeb-9569-faa0607cefd6">25_12_10_vercel.png</a></td></tr><tr><td>AWSでサブディレクトリを設定する</td><td><a href="/docs/documentation/ja-gitbook-documentation/publish/custom-domain/setting-a-custom-subdirectory/configuring-a-subdirectory-with-aws.md">CloudFront と Route 53 を使って AWS でサブディレクトリを設定する</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FYf6n0ahpdjIA7b9Jba2N%2FAWS.png?alt=media&amp;token=52c282fd-5f63-47ec-8a88-6f0cca3680fe">25_12_10_aws_1.png</a></td><td></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FjY2LAVXbmW6RUmaTwXxF%2FAWS%20-%20dark.png?alt=media&amp;token=ae589916-116d-4a29-8d59-985552addda5">25_10_23_aws.png</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FAtNKcIuzR5zE8wUVHR0O%2FAWS.png?alt=media&amp;token=36b45c4e-0c33-47aa-b73c-5f59fd0649ff">25_12_10_aws.png</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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
