Skip to content

fix: make the Block AI crawlers setting an explicit decision - #92

Merged
cport1 merged 1 commit into
mainfrom
fix/block-ai-crawlers-blocks
Sep 21, 2026
Merged

cport1 merged 1 commit into
mainfrom
fix/block-ai-crawlers-blocks

Conversation

@cport1

@cport1 cport1 commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

What changes

Block AI crawlers now refuses a recognised AI crawler as an explicit decision, before any heuristic scoring.

Why

The setting worked by withdrawing the crawler's good-bot pass and letting scoring decide. Scoring adds no user-agent points for a recognised bot, so a well-behaved AI crawler sending ordinary headers could finish below the block threshold. An owner's instruction should not depend on how a request happens to score.

Behaviour

  • Setting on: a recognised AI crawler is refused at any min_score_to_block, with the flag ai_crawler_blocked and denied_by: block_ai_crawlers, so the Detections page says why.
  • Setting off: unchanged, the crawler is treated as a good bot.
  • The custom allowlist still wins.
  • Search engines and social bots are unaffected.
  • Monitor mode (the default) still suppresses the block like every other enforcement path and counts it in "enforcing would have acted on N requests".

Tests

New tests/AiCrawlerPolicyTest.php covers each line above. Full suite: 106 passed.

The setting withdrew a recognised AI crawler's good-bot pass and left the
outcome to heuristic scoring. Scoring adds no user-agent points for a
recognised bot, so a well-behaved AI crawler could finish below the block
threshold.

A crawler the owner has chosen to block is now refused before scoring, with the
flag ai_crawler_blocked so the Detections page says why. The custom allowlist
still wins, search engines and social bots are unaffected, and monitor mode
suppresses the block like every other enforcement path.

Adds behaviour tests for the setting.
@cport1
cport1 force-pushed the fix/block-ai-crawlers-blocks branch from 8746f1a to c43b327 Compare September 21, 2026 22:38
@cport1 cport1 changed the title fix: Block AI crawlers now blocks AI crawlers fix: make the Block AI crawlers setting an explicit decision Sep 21, 2026
@cport1
cport1 merged commit 4a668e6 into main Sep 21, 2026
3 checks passed
@cport1
cport1 deleted the fix/block-ai-crawlers-blocks branch September 21, 2026 22:39
@cport1 cport1 mentioned this pull request Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant