···48 action: CHALLENGE
4950dnsbl: false
51+52+# By default, send HTTP 200 back to clients that either get issued a challenge
53+# or a denial. This seems weird, but this is load-bearing due to the fact that
54+# the most aggressive scraper bots seem to really really want an HTTP 200 and
55+# will stop sending requests once they get it.
56+status_codes:
57+ CHALLENGE: 200
58+ DENY: 200
+2
docs/docs/CHANGELOG.md
···1112## [Unreleased]
130014## v1.17.0: Asahi sas Brutus
1516- Ensure regexes can't end in newlines ([#372](https://github.com/TecharoHQ/anubis/issues/372))
···1112## [Unreleased]
1314+- Added the ability to [customize Anubis' HTTP status codes](./admin/configuration/custom-status-codes.mdx) ([#355](https://github.com/TecharoHQ/anubis/issues/355))
15+16## v1.17.0: Asahi sas Brutus
1718- Ensure regexes can't end in newlines ([#372](https://github.com/TecharoHQ/anubis/issues/372))
···1+# Custom status codes for Anubis errors
2+3+Out of the box, Anubis will reply with `HTTP 200` for challenge and denial pages. This is intended to make AI scrapers have a hard time with your website because when they are faced with a non-200 response, they will hammer the page over and over until they get a 200 response. This behavior may not be desirable, as such Anubis lets you customize what HTTP status codes are returned when Anubis throws challenge and denial pages.
4+5+This is configured in the `status_codes` block of your [bot policy file](../policies.mdx):
6+7+```yaml
8+status_codes:
9+ CHALLENGE: 200
10+ DENY: 200
11+```
12+13+To match CloudFlare's behavior, use a configuration like this:
14+15+```yaml
16+status_codes:
17+ CHALLENGE: 403
18+ DENY: 403
19+```
···37go tool anubis \
38 --bind=./anubis.sock \
39 --bind-network=unix \
040 --target=unix://$(pwd)/unixhttpd.sock &
4142# A simple TLS terminator that forwards to Anubis, which will forward to
···37go tool anubis \
38 --bind=./anubis.sock \
39 --bind-network=unix \
40+ --policy-fname=../anubis_configs/aggressive_403.yaml \
41 --target=unix://$(pwd)/unixhttpd.sock &
4243# A simple TLS terminator that forwards to Anubis, which will forward to