INTEGRITY Cloudflare Docs

Known issues

Here are some known bugs and issues with Cloudflare Pages:

Builds and deployment

Git configuration

Build configuration

Custom Domains

Pages Functions

Enable Access on your *.pages.dev domain

If you would like to enable Cloudflare Access] for your preview deployments and your *.pages.dev domain, you must:

  1. In the Cloudflare dashboard, go to the Workers & Pages page.

    Go to Workers & Pages ↗
  2. Select your Pages project.

  3. Go to Settings > Enable access policy.

  4. Select Manage on the Access policy created for your preview deployments.

  5. Under Access > Applications, select your project.

  6. Select Configure.

  7. Under Public hostname, in the Subdomain field, delete the wildcard (*) and select Save. You may need to change the Application name at this step to avoid an error.

At this step, your *.pages.dev domain has been secured behind Access. To resecure your preview deployments:

  1. Go back to your Pages project > Settings > General > and reselect Enable access policy.
  2. Review that two Access policies, one for your *.pages.dev domain and one for your preview deployments (*.<YOUR_SITE>.pages.dev), have been created.

If you have a custom domain and protected your *.pages.dev domain behind Access, you must:

  1. In the Cloudflare dashboard, go to Zero Trust > Access controls > Applications. Select Create new application > Self-hosted and private.
  2. Select Add public hostname and select your custom domain from the Domain dropdown menu.
  3. Configure your access rules to define who can reach the Access authentication page.
  4. Select Create.

If you have an issue that you do not see listed, let the team know in the Cloudflare Workers Discord. Get your invite at discord.cloudflare.com, and share your bug report in the #pages-general channel.

Delete a project with a high number of deployments

You may not be able to delete your Pages project if it has a high number (over 100) of deployments. The Cloudflare team is tracking this issue.

As a workaround, you can use wrangler pages deployment delete to delete deployments individually. After you delete your deployments, you will be able to delete your Pages project.

npx wrangler pages deployment delete <DEPLOYMENT_ID> --project-name <PROJECT_NAME>

Use the --force flag to skip the confirmation prompt and to force deletion of aliased deployments.

To delete all your deployments for a particular project name, you could run the following shell script:

prod_id=""
while :; do
  ids=$(npx wrangler pages deployment list --project-name <PROJECT_NAME> --json | jq -r '.[].Id')
  to_delete=$(echo "$ids" | grep -v -F -x "$prod_id" | grep .)
  [ -z "$to_delete" ] && { echo "Done. Production: $prod_id"; break; }
  echo "Deleting $(echo "$to_delete" | wc -l | tr -d ' ') deployments..."
  while IFS= read -r id; do
    if ! npx wrangler pages deployment delete "$id" --project-name <PROJECT_NAME> --force 2>&1 | tee /tmp/wrangler-del.log | grep -q "Successfully deleted"; then
      grep -q "active production deployment" /tmp/wrangler-del.log && prod_id="$id"
    fi
  done <<< "$to_delete"
done

Note that this will not delete the active production deployment if one exists.

Use Pages as Origin in Cloudflare Load Balancer

Cloudflare Load Balancing will not work without the host header set. To use a Pages project as target, make sure to select Add host header when creating a pool, and set both the host header value and the endpoint address to your pages.dev domain.

Refer to Use Cloudflare Pages as origin for a complete tutorial.