> For the complete documentation index, see [llms.txt](https://securitybot.gitbook.io/securitybot-knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://securitybot.gitbook.io/securitybot-knowledge-hub/bot-guide/chat-filters/link-filter.md).

# Link Filter

{% hint style="info" %}
**Available on all tiers** — Free tier: 10 filtered actions per day, 20 allowlisted domains. Premium: unlimited. [Compare plans →](/securitybot-knowledge-hub/plans-and-pricing/plans-and-pricing.md)
{% endhint %}

SecurityBot’s Link Filter automatically removes any message containing a link to a domain that hasn’t been explicitly approved. This helps prevent users from sharing phishing sites, scam promotions, or links to untrusted content.

***

### How to Manage Allowed Domains

### Enable or disable domain filtering

You can toggle the filter using:

```
/settings block_links
```

* When **enabled**, any link not on your allowlist will be automatically deleted.
* When **disabled**, users can post links freely, unless blocked by another filter.

This command also shows:

* Whether link filtering is currently active
* The total number of domains currently allowed (your **domain whitelist size**)
* An option to **Allow Default Links**, which automatically whitelists common trusted domains used across the ecosystem (e.g., X, CardanoScan and other common DAPP's and tools)

{% hint style="info" %}
Use the **"Allow Default Links"** button if you want to quickly pre-approve frequently used safe domains.
{% endhint %}

### Allow a trusted domain

To let users post links to a specific domain:

```
/allow_domain [domain]
```

Example:

```
/allow_domain securitybot.info
```

This allows any URL from that domain, such as:

* `https://securitybot.info/checkout`
* `https://securitybot.info/search`

This command adds the domain to your allowlist. Once approved, users can share links that include this domain without being flagged or removed.

{% hint style="info" %}
**Subdomains are not included.**\
For example, allowing `securitybot.info` will **not** allow `docs.securitybot.info`. You must allow each subdomain explicitly if needed.
{% endhint %}

***

### Remove a domain from the allowlist

If you no longer trust a domain or it’s no longer relevant:

```
/remove_domain [domain]
```

Example:

```
/remove_domain securitybot.info
```

Any future links to this domain will be blocked if the filter is active.

***

### View all allowed domains

To check what domains are currently permitted:

```
/chat_filters domain view
```

Select **"Allowed Domains"** from the list to see a full embed of all domains in your allowlist.

***

### Best Practices

* Only allow domains you trust and expect your members to use
* Add any project-related services (e.g., `ipfs.io`, `jpg.store`, `yourproject.xyz`)
* Use `/chat_filters domain view` regularly to audit your allowlist
* Combine with a logging channel to track flagged attempts

{% hint style="info" %}
Only admins or users with Discord’s Administrator permission can manage domain filtering.
{% endhint %}

***

Next up: Learn how to restrict Discord invites with [Discord Invite Filter](/securitybot-knowledge-hub/bot-guide/chat-filters/discord-invite-filter.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://securitybot.gitbook.io/securitybot-knowledge-hub/bot-guide/chat-filters/link-filter.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
