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 linksAsk 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| Option | Removes |
|---|---|
block_all | Every link. The allow-list still lets specific domains through. |
block_invites | Discord server invites (discord.gg / discord.com/invite). |
block_nsfw | Adult / NSFW links. |
block_ip_loggers | IP-logger & grabber links (grabify, iplogger…). |
block_phishing | Phishing and scam links (free-nitro, fake gifts…). |
block_suspicious_tlds | Risky top-level domains (.ru .tk .ml .xyz .zip…). |
allow / block | Explicit 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 linksGood 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.