# --adblock-rules

Source: https://zshot-cli.com/reference/flags/security/adblock-rules/
Markdown: https://zshot-cli.com/reference/flags/security/adblock-rules/index.md
Section: [Reference](https://zshot-cli.com/reference/) › [Flags](https://zshot-cli.com/reference/flags/) › [Security](https://zshot-cli.com/reference/flags/security/)
CLI: `--adblock-rules` · REST: CLI only
Value: `PATH_OR_URL`

Blocks requests and hides page elements that match an EasyList-syntax filter list, read from a file path or `http(s)` URL. Repeatable; every list joins one engine.

Lists load once at startup and malformed lines are skipped.

## Blocking

A request matching a blocking rule is cancelled, whatever its resource type. A rule matching the target URL itself stops the render before any connection, exiting with code 5 or answering `403` on the server.

An exception rule, `@@`, only lifts another adblock rule. It cannot admit an address the IP filter blocks or a page robots.txt disallows.

## Hiding

After the page loads, ZShot injects `display:none` CSS for the list's host-scoped hiding rules and runs its scriptlets. Elements added later stay visible, and generic hiding rules are not applied.

## Example

**CLI**

```sh
zshot -f pipeline.png \
  --adblock-rules https://easylist.to/easylist/easylist.txt \
  https://zshot-cli.com/example_assets/zrm/
```

## Related

Flags:

- [`--server-update-adblock-interval`](https://zshot-cli.com/reference/flags/server/server-update-adblock-interval/)
- [`--ip-blocklist`](https://zshot-cli.com/reference/flags/security/ip-blocklist/)
- [`--block-ip-range`](https://zshot-cli.com/reference/flags/security/block-ip-range/)
- [`--skip-robot-instructions`](https://zshot-cli.com/reference/flags/browser/skip-robot-instructions/)

Topics:

- [Exit Codes](https://zshot-cli.com/reference/exit_codes/)
- [EasyList](https://easylist.to) — Filter lists and syntax

## Navigation

- [Examples](https://zshot-cli.com/examples/)
- [Download](https://zshot-cli.com/download/)
- [Purchase](https://zshot-cli.com/purchase/)
- [Reference](https://zshot-cli.com/reference/)
  - [Formats](https://zshot-cli.com/reference/formats/)
  - [Flags](https://zshot-cli.com/reference/flags/)
    - [Common](https://zshot-cli.com/reference/flags/common/)
    - [Agents](https://zshot-cli.com/reference/flags/agents/)
    - [Archive](https://zshot-cli.com/reference/flags/archive/)
    - [Browser](https://zshot-cli.com/reference/flags/browser/)
    - [Diagnostics](https://zshot-cli.com/reference/flags/diagnostics/)
    - [Document](https://zshot-cli.com/reference/flags/document/)
    - [Image](https://zshot-cli.com/reference/flags/image/)
    - [Navigator](https://zshot-cli.com/reference/flags/navigator/)
    - [Security](https://zshot-cli.com/reference/flags/security/)
      - **--adblock-rules**
      - [--allow-ip-range](https://zshot-cli.com/reference/flags/security/allow-ip-range/)
      - [--allow-unsafe-ssl](https://zshot-cli.com/reference/flags/security/allow-unsafe-ssl/)
      - [--block-ip-range](https://zshot-cli.com/reference/flags/security/block-ip-range/)
      - [--block-private-ips](https://zshot-cli.com/reference/flags/security/block-private-ips/)
      - [--container](https://zshot-cli.com/reference/flags/security/container/)
      - [--insecure-web-mode](https://zshot-cli.com/reference/flags/security/insecure-web-mode/)
      - [--ip-blocklist](https://zshot-cli.com/reference/flags/security/ip-blocklist/)
      - [--no-sandbox](https://zshot-cli.com/reference/flags/security/no-sandbox/)
    - [Server](https://zshot-cli.com/reference/flags/server/)
    - [Video](https://zshot-cli.com/reference/flags/video/)
  - [Agents](https://zshot-cli.com/reference/agents/)
  - [Configuration](https://zshot-cli.com/reference/configuration/)
  - [Crawling](https://zshot-cli.com/reference/crawling/)
  - [Devices](https://zshot-cli.com/reference/devices/)
  - [Docker](https://zshot-cli.com/reference/docker/)
  - [Exit Codes](https://zshot-cli.com/reference/exit_codes/)
  - [Linux](https://zshot-cli.com/reference/linux/)
  - [LLM Connections](https://zshot-cli.com/reference/llm_connections/)
  - [LLM Formatting](https://zshot-cli.com/reference/llm_formatting/)
  - [Local Inputs](https://zshot-cli.com/reference/inputs/)
  - [Navigator](https://zshot-cli.com/reference/navigator/)
  - [Security](https://zshot-cli.com/reference/security/)
  - [Server](https://zshot-cli.com/reference/server/)
  - [Shell completions](https://zshot-cli.com/reference/shell_completions/)
  - [Storage](https://zshot-cli.com/reference/storage/)
  - [Timeouts](https://zshot-cli.com/reference/timeouts/)
  - [Web Bot Auth](https://zshot-cli.com/reference/web_bot_auth/)
- [Support](https://zshot-cli.com/support/)
- [Changelog](https://zshot-cli.com/changelog/)

Site index: https://zshot-cli.com/llms.txt

