URL: /rules/adblock/element-hiding

---
title: "Adblock Element Hiding"
description: "Checks for elements that would be hidden by common adblockers"
---

<Note>**Cloud rule** - requires login (`squirrel auth login`). All three [adblock rules](/rules/adblock) share a single **5-credit** blocklist check per audit. Skipped when not logged in. See [Cloud rules](/cloud/rules).</Note>

Checks for elements that would be hidden by common adblockers (matched server-side against the full EasyList cosmetic rules)

| | |
|---|---|
| **Rule ID** | `adblock/element-hiding` |
| **Category** | [Adblock Detection](/rules/adblock) |
| **Scope** | Site-wide |
| **Severity** | warning |
| **Weight** | 3/10 |

## Solution

Elements matching adblock filter rules may be hidden for users with adblockers. This can affect ad revenue or hide legitimate content if element names/classes match ad patterns. Consider renaming CSS classes that unintentionally match ad-blocking patterns (like .ad-*, .banner, .sponsor).

## Options

This rule supports the following configuration options:

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `maxMatchesToReport` | unknown | `undefined` | Maximum matching elements to report in detail |
| `lists` | unknown | `undefined` | Filter lists to check against |

### Configuration Example

```toml squirrel.toml
[rules."adblock/element-hiding"]
maxMatchesToReport = 20
```

## Enable / Disable

### Disable this rule

```toml squirrel.toml
[rules]
disable = ["adblock/element-hiding"]
```

### Disable all Adblock Detection rules

```toml squirrel.toml
[rules]
disable = ["adblock/*"]
```

### Enable only this rule

```toml squirrel.toml
[rules]
enable = ["adblock/element-hiding"]
disable = ["*"]
```
