> ## Documentation Index
> Fetch the complete documentation index at: https://help-center-starter-replace-template-content.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloudflare Pages deployment

> Deploy your Mintlify docs on Cloudflare Pages for edge hosting.

Cloudflare Pages is another option for hosting Mintlify docs close to your users. This approach uses Cloudflare's global edge network and works well if your team already uses Cloudflare for DNS and CDN.

## When to use Cloudflare Pages

Use Cloudflare Pages when you:

* Already use Cloudflare for your DNS and want everything in one place.
* Need Cloudflare Access for authentication in front of your docs.
* Want Cloudflare's DDoS protection and WAF on your docs site.

## Setup overview

<Steps>
  <Step title="Build your Mintlify project">
    Run `mintlify build` locally or in CI to generate a static build of your docs:

    ```bash theme={null}
    mintlify build
    ```
  </Step>

  <Step title="Connect to Cloudflare Pages">
    In the Cloudflare dashboard, go to **Pages → Create a project** and connect your Git repository. Set the build command to `mintlify build` and the output directory to `.mintlify/build`.
  </Step>

  <Step title="Configure your domain">
    Add a custom domain in **Pages → \[Your project] → Custom domains**. Cloudflare manages the DNS automatically if your domain's nameservers point to Cloudflare.
  </Step>
</Steps>

## Cloudflare Access

To require authentication before readers can access your docs, add a Cloudflare Access policy in front of your Pages project. This works independently of Mintlify's built-in authentication features.
