CDNでCoreDashのクローラーをホワイトリストに登録する
CDNが当社のパフォーマンス測定ツールをブロックしています。アクセスを許可する方法は以下の通りです。

Core/Dashクローラーを許可リストに登録する
CDNのファイアウォールによって、クローラーがブロックされることがあります。これはCDNのセキュリティ設定によるものです。Webサイトにキャプチャが表示されますが、クローラーがそれを解決しようとすることはありません。

Core/Dashクローラーのブロックを解除する
Core/Dashクローラーは、サーバーに対してCore/Dashパフォーマンス・テスターとしてアクセスします:
CoreDash/1.0 (+https://www.corewebvitals.io/coredash-performance-tester)
実際のブラウザでページを読み込み、Largest Contentful Paint、Interaction to Next Paint、Cumulative Layout Shiftを測定します。これらの指標は、ページが実際にレンダリングされて初めて発生するため、実際のブラウザが必要です。
これが、CDNにブロックされる最も一般的な原因です。インフラチームがWAFのセキュリティを「高」に設定していると、基本的にすべてのボットがブロックされます。これが「安全なボット」であることをCDNに伝える必要があります。
CoreDash/1.0のボットチェックをスキップし、それ以外はそのままにするルールを1つ追加します。
IPアドレスではなく、ユーザーエージェントで一致させる
IPアドレスではなく、ユーザーエージェントで一致させてください。テストはクラウドインフラから実行されるため、実行ごとに送信元IPが変わります。今日特定のIPアドレスを許可リストに追加しても、来週のテストは異なるIPから実行されて再びブロックされる可能性があります。CoreDash/1.0という文字列は変わらないため、この文字列を条件に指定してください。
Cloudflare
Cloudflareは、他のどのCDNよりもテストをブロックします。必要となるルールは、プランによって異なります。
Proプラン以上の場合は、アクションに「Skip」を指定したWAFのカスタムルールを追加します:
- Go to Security > Security rules and create a rule. On the new dashboard this lives under Security rules.
- Name it clearly, for example Allow Core/Dash.
- Click edit expression and change the expression to
http.user_agent contains "CoreDash/". - Set the action to Skip.
- In the Skip options, check Super Bot Fight Mode. Check All managed rules too if a managed rule is what blocked the test.
- Deploy the rule.

One catch on the Free plan. Bot Fight Mode there does not run through the WAF, so a Skip rule cannot touch it and there is no exception to make. If you are on Free and the test keeps getting challenged, turn Bot Fight Mode off under Security > Bots while you run the test, then switch it back on. A paid plan gives you Super Bot Fight Mode, which does respect Skip rules.
AWS WAF and CloudFront
CloudFront itself does not block the crawler. The block comes from the AWS WAF web ACL attached to your distribution. Add an Allow rule above your Bot Control group:
- Open the web ACL linked to your CloudFront distribution.
- Add a rule and choose Rule builder, then a custom rule.
- For the inspection, choose Single header and enter
User-Agent. - Set the match type to Contains string and the string to
CoreDash. - Set the action to Allow.
- Give the rule a lower priority number than your Bot Control rule group so it runs first.
Order matters here. Allow is a terminating action in AWS WAF. When your rule matches, WAF allows the request and stops evaluating, so Bot Control never sees it. Put the rule below Bot Control and the block has already happened before your Allow rule runs.
Still blocked?
If you add the rule, run another test, and it still fails, the block is coming from another layer: a second WAF, a security plugin, or a server rule in .htaccess or nginx. Look for the same CoreDash user agent there and allow it the same way. If you are stuck, contact us with the firewall you use and we will help you find the rule.

