{
  "id": 6875950,
  "title": "Cloudflare and PSI Automation: Challenges, Allowlists & Monitoring",
  "url": "https://urgent.news/2026/09/12/cloudflare-and-psi-automation-challenges-allowlists-monitoring",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-12T06:44:16.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/apogeewatcher/cloudflare-and-psi-automation-challenges-allowlists-monitoring-5bka"
  },
  "original_language": "en",
  "account": "When testing a URL in PageSpeed Insights from a laptop, the request often completes successfully. However, when the same URL is scheduled to run through a monitoring stack or re-run Lighthouse via a headless pipeline, Cloudflare's challenge prevents the document request from completing, resulting in a 403 error or an empty error shell. This indicates that Cloudflare considers automation as not a visitor worth serving HTML. For agencies, this issue is problematic as they trust the green screenshot from manual checks, but overnight automation red-flagging the homepage leads to calls from clients asking what went wrong.\n\nThe problem arises because PageSpeed Insights and Lighthouse require a full HTML document and a rendered page to compute lab metrics. An interactive browser session typically provides enough context for Cloudflare to allow the request, but scheduled and API-driven runs lack this context. They originate from data-center ranges, use predictable automation User-Agents, lack challenge cookies, and cannot complete managed challenges like a human browser can. As a result, Cloudflare's challenge interstitial, empty document, or failed fetch response is measured instead of the intended real document.\n\nTo differentiate between these cases, it is important to understand which Cloudflare controls typically cause the failures. Bot Fight Mode, available for free, challenges traffic matching known bot patterns and cannot be bypassed with WAF custom rules or Page Rules. Super Bot Fight Mode, available in Pro and higher plans, offers configurable actions and Skip actions in WAF custom rules, providing a more practical solution when legitimate monitoring needs to coexist with automated traffic. Under Attack Mode raises friction for almost everyone, raising false alarms and making it a poor permanent monitoring configuration.\n\nOther Cloudflare products, such as country blocks, ASN blocks, rate limits, and managed rule sets, can also interfere with PageSpeed Insights automation. The key to resolving these issues is to match the failed run to the correct Cloudflare product and apply the appropriate allowlist patterns, such as IP Access rules or Skip rules, before the block or challenge is triggered. This ensures that legitimate PageSpeed Insights traffic can be allowed without opening the site to every scraper on the internet.",
  "summary": "The same client URL opened in PageSpeed Insights from a laptop often completes. Put that URL on a schedule, call the PageSpeed Insights API from a monitoring stack, or re-run Lighthouse through a headless pipeline, and the document request returns a Cloudflare challenge, a 403, or an empty error shell. The score that ends up in the ticket is not a Core Web Vitals regression. It is a security edge…",
  "key_points": [
    "Cloudflare's challenge prevents automated URL requests from completing successfully",
    "PageSpeed Insights and Lighthouse require full HTML document for metric computation",
    "Super Bot Fight Mode offers configurable actions to allow legitimate monitoring traffic"
  ],
  "editors_take": "Cloudflare's bot mitigation modes complicate agencies' use of automated PageSpeed Insights and Lighthouse checks, requiring allowlist adjustments to ensure legitimate traffic isn't blocked or challenged.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}