# Link filter

> Block Discord invites or all links in chosen channels with Based's link filter, with allowed domains, exempt roles and warning messages.

URL: https://www.jalkarna.in/based/docs/link-filter/  
Last updated: 2026-11-16

The link filter removes unwanted links in the channels you choose. It is off by default. Pick a **link policy** (Discord invites only is the default), list any **allowed domains** such as `youtube.com`, and choose **exempt roles** that can post any link. Moderator roles cannot be used as exempt roles.

When Based removes a link it can post a short warning. A cooldown stops repeated warnings to the same member in one channel. Warnings cannot ping @everyone or @here. Based needs **Manage Messages** in filtered channels. For a wider anti-spam plan, see [how to stop spam and scam links](https://www.jalkarna.in/based/learn/how-to-stop-spam-and-scam-links-on-discord/).

## Settings
Change these in the [dashboard](https://www.jalkarna.in/based/dashboard/) or with `/setup` in Discord. They apply to one server at a time.

| Setting | Default | What it does |
|---|---|---|
| Enabled | Off | Turn this feature on for this server. |
| Allowed channels | Not set | Leave empty to let Based work in every channel it can see. |
| Excluded channels | Not set | Links are never removed in these channels. |
| Link policy | Discord invitations | Which links Based removes. |
| Allowed domains | Empty | One website per line, like example.com. No full links, paths, wildcards or IP addresses. |
| Exempt roles | Not set | Optional. Members with these roles can post any link. Moderator roles can't be used. |
| Warning text | Links are restricted in this channel. | Optional. Shown after Based removes a link. @everyone and @here aren't allowed. |
| Warning cooldown | 30 | The shortest gap between warnings to the same member in one channel, in seconds. |

## Permissions Based needs
For this module Based's role needs: **View Channel**, **Manage Messages**. See [permissions](https://www.jalkarna.in/based/docs/permissions/) for how to grant them only where they are needed.
