🎉 Launch offer: the next 5 servers get 30 days free. Claim a spot →
All topics & search

Guide/Protect your server/Link filtering

Link filtering — Discord Bot Guide

Block every link or only the dangerous kinds; masked and bare links are caught; who is exempt.

Quick answer

Block dangerous links, allow your own domains

!automod links enabled:true block_invites:true block_ip_loggers:true block_phishing:true action:timeout
!automod links allow:youtube.com,tenor.com
!permission grant @Trusted links

Ask the guide

Step by step

Block everything, or by type

Turn the filter on, then either block every link or pick the categories to remove. A blocked link deletes the whole message, and the punishment (delete, timeout, kick, ban…) is yours to choose.

!automod links enabled:true block_all:true action:delete
!automod links enabled:true block_invites:true block_nsfw:true block_ip_loggers:true block_phishing:true action:timeout
!automod links enabled:true allow:youtube.com,tenor.com,discord.com block_all:true
OptionRemoves
block_allEvery link. The allow-list still lets specific domains through.
block_invitesDiscord server invites (discord.gg / discord.com/invite).
block_nsfwAdult / NSFW links.
block_ip_loggersIP-logger & grabber links (grabify, iplogger…).
block_phishingPhishing and scam links (free-nitro, fake gifts…).
block_suspicious_tldsRisky top-level domains (.ru .tk .ml .xyz .zip…).
allow / blockExplicit domain allow-list and block-list.

Masked and embedded links are caught

Hiding a link behind text — [totally safe](https://evil.tk/scam) — does not get it past the filter: the real target is read, not the display text. Bare links with no https:// (like discord.gg/x or evil.xyz) are caught too. Ordinary words such as index.js are not mistreated as links.

Who is exempt

Staff (Manage Messages), roles on links.allowRoleIds, and anyone with the security.links grant skip the filter. Everything is also configurable on the dashboard under Security → AutoMod, including the punishment and each link type.

Copy and try

Block dangerous links, allow your own domains

!automod links enabled:true block_invites:true block_ip_loggers:true block_phishing:true action:timeout
!automod links allow:youtube.com,tenor.com
!permission grant @Trusted links

Good to know

  • A blocked link deletes the whole message.
  • Look-alike and zero-width tricks are normalised before matching.

Still stuck? Ask in the support server.

Link filtering — Discord Bot Guide · Sweet