Discord AutoMod regex filters let you block messages by pattern instead of by exact word. That matters for scam links, because scammers rarely post the same URL twice. They swap letters, add hyphens and change domain endings, but the shape of the link stays familiar.
This wiki explains where AutoMod lives, who can use it, how to add regex patterns to a custom keyword rule, and which actions and exemptions to pick. It then gives eight example patterns for common Discord scams, an allow list example, a safe testing routine and a limits table.
Everything here is checked against Discord's help centre, its developer documentation and its 9 November 2026 patch notes. Every pattern was compiled and tested with Rust's regex library, the same flavour AutoMod uses. None of them are official Discord recommendations, and none will catch every scam.
At a glance - Who can set it up: members with Manage Server or Administrator. - Community required? No. Discord says AutoMod is available for all servers. - Where: Server Settings, then AutoMod (listed under Moderation, and reachable from Safety Setup). - Regex flavour: Rust. No backreferences. Case-insensitive by default. - Limits: up to 10 regex patterns per rule, each up to 260 characters (developer docs). - Mobile: Discord's 9 November 2026 patch notes list AutoMod as added on mobile.
Before You Start: Requirements
You need the Manage Server or Administrator permission. Discord's AutoMod FAQ says those two permissions can access, create and edit rules, and its regex article repeats the same requirement.
You do not need a Community server. The FAQ states that AutoMod is available for all servers. Community servers do get one extra layer on top: Discord says every Community runs a suspicious link filter that blocks known malware and phishing sites.
If you are setting permissions for a new mod team, our Discord roles and permissions guide explains how to hand out Manage Server without giving away everything else.
🛡️ Where to Find AutoMod
On desktop, open your server name, choose Server Settings, then select AutoMod in the Moderation group. Discord's newer help text also routes through Server Settings > Safety Setup, where AutoMod has an Edit button.
Opening AutoMod from Server Settings on desktop. Image: Discord.
On mobile, Discord's 9 November 2026 patch notes list AutoMod among three admin features newly added to the phone app. The AutoMod FAQ still says rules cannot be changed on mobile, and Discord has not published a mobile walkthrough. Our post "Discord Mobile Server Settings" covers what that update does and does not confirm.
The Built-In Rules
The AutoMod page lists four rule types. Three are ready-made, and one is where your regex goes.
| Rule (UI label) | What it does | Timeout option? |
|---|---|---|
| Block Mention Spam | Blocks messages over your unique mention limit (max 50) and can detect mention raids | Yes |
| Block Suspected Spam Content | Machine-learning filter for spam such as "free Nitro" ads and invite spam (English only) | No |
| Block Commonly Flagged Words | Discord's word lists: Severe Profanity, Insults and Slurs, Sexual Content | No |
| Block Custom Words | Your own keywords and regex patterns (the help centre calls this a Custom Keyword Rule) | Yes |
The four AutoMod rule types on desktop. Image: Discord.
Turn on Block Suspected Spam Content first. Discord says it learns from reported spam, so it can catch scams no regex anticipates. It also says the filter will miss some spam, which is why custom patterns still help.
Block Mention Spam with a 20 mention limit and mention raid detection ticked. Image: Discord.
How to Add Discord AutoMod Regex Patterns
Regex lives inside a custom rule. Here is the process.
- Open Server Settings > AutoMod.
- Next to Block Custom Words, select Create. Give the rule a clear name, such as "Scam links".
- Under Choose your words, expand Use regex patterns for advanced matching (optional).
- Paste one pattern per line. The counter shows how many of your 10 slots are used.
- Under Choose a response, pick your actions (see the next section).
- Under Allow certain roles or channels (optional), add any exemptions.
- Select Save Changes. If the pattern has a problem, Discord shows an error instead of saving.
The regex box inside a custom rule, using Discord's own email example. Image: Discord.
You can also mix plain keywords into the same rule. The keyword box takes up to 1,000 terms, with * wildcards: cat* matches words starting with "cat", *cat matches words ending in it, and *cat* matches it anywhere.
A quick shortcut from the help centre: highlight a word in any message, right-click, and choose Flag Word to add it to a rule.
⚙️ Actions and Exemptions
Each rule can do any mix of three things when it fires.
- Block message. The message is never posted. The sender sees a private notice, and you can add a custom message of up to 150 characters.
- Send alert. AutoMod posts the flagged message, author and channel to a channel you choose. Pick one only mods can see, since anyone with access will see the alerts.
- Timeout member. Available on custom word and mention spam rules. The developer docs cap timeouts at 4 weeks.
Choosing a private mod channel for AutoMod alerts. Image: Discord.
For a new scam rule, start with Send alert only. Watch what it catches for a few days, then add Block message. Timeouts suit patterns you trust completely, such as IP grabber domains. Our Discord mute vs timeout guide explains what a timed-out member can and cannot do.
Exemptions sit under Allow certain roles or channels (optional). The developer docs allow up to 20 exempt roles and 50 exempt channels per rule. Exempting a channel also exempts its threads and voice text chat.
The exemption field. Admins and Manage Server members are always exempt. Image: Discord.
Example Regex Patterns for Common Scams
These are our own starting points, written for this guide. Each one compiled with Rust's regex library and was run against sample scam links and legitimate links before publishing. Treat them as drafts: test them in your own server before you block anything.
AutoMod applies case-insensitive matching by default, so none of these need a flag.
1. Discord lookalike domains
(?:https?://|www\.)[^\s/]*(?:d[1l!|\x{456}\x{131}]s[ck][o0\x{43E}]r[dl]|disc\x{43E}rd|disc0rd|discorcl|dicsord|discrod|disocrd|dsicord|diiscord|disscord|discordd)
Catches links whose domain misspells "discord", such as dlscord, d1scord, discorcl or dicsord. The \x{...} codes cover Cyrillic and Turkish letters that look like "i" and "o". It does not match discord.com, discord.gg or discord.gift.
2. Fake Nitro and gift domains
(?:https?://|www\.)[^\s/]*(?:d[i1l]sc[o0]rd[-_]?(?:nitro|gifts?|giveaway|promo|airdrop)|(?:free|claim|get)[-_]?nitro|nitro[-_]?(?:gift|free|drop))
Catches domains like discord-nitro, discordgift, free-nitro or nitro-drop. The real discord.gift has a dot after "discord", so it does not match.
3. Steam Community lookalikes
(?:https?://|www\.)[^\s/]*(?:st[e3][a4]rn(?:c[o0]m|p[o0]w)|st[e3][a4]m-?c[o0]m+un[1l!|]ty|steamcomunity|steamcommnuity|steamcommuntiy|steamcomminuty|steamcommunitty|steam-community|steamcommunity-)
Covers "rn" in place of "m", a 1 or l in place of "i", and common typos. The real steamcommunity.com and store.steampowered.com do not match. It is a list of known tricks, so new spellings will get through.
4. IP grabbers
\b(?:grabify\.link|iplogger\.(?:org|com|ru|info|co|cn)|iplog\.co|2no\.co|yip\.su|iplis\.ru|blasze\.com|ps3cfw\.com|ipgrabb?er\.ru|02ip\.ru|ezstat\.ru)\b
These domains appear on the community-maintained Anti-IP-Grabber Blocklist on GitHub. Logging services rotate through many decoy domains, so this list is a floor, not a fence.
5. Shortened URLs
\b(?:bit\.ly|tinyurl\.com|cutt\.ly|is\.gd|rb\.gy|shorturl\.at|tiny\.cc|ow\.ly|t\.ly|rebrand\.ly)/\S+
Short links hide where they go. Plenty of honest people use them too, so use Send alert here, or exempt trusted roles.
6. Invite spam
(?:discord(?:app)?\s*\.\s*com\s*/\s*invite|discord\s*\.\s*gg|dsc\s*\.\s*gg)\s*/\s*[a-z0-9-]{2,}
Catches server invites, including ones with spaces added to dodge filters ("discord . gg / abc"). Exempt your staff role or a partners channel so your own invites still work.
7. Masked links that pretend to be URLs
\[[^\]]*(?:https?://|www\.|\.(?:com|gg|gift|ly)\b)[^\]]*\]\(\s*<?https?://
Discord's masked links show text in place of the real address. This flags masked links whose visible text itself looks like a link, such as [discord.gift/abc](https://somewhere-else). Normal masked links like [patch notes](https://...) pass.
8. "Free Nitro" bait text
(?:free|claim)\W{0,3}(?:discord\W{0,3})?n[i1l!]tr[o0]|n[i1l!]tr[o0]\W{0,3}(?:for\W{0,3})?free
Matches wording, not links, so it will also flag members asking "is free Nitro real?". Use alert only.
Allow Lists for Legitimate Domains
Custom rules have an optional allow list, so you can stop real links from triggering a broad pattern. The developer docs allow up to 100 entries per custom rule, each up to 60 characters, with the same * wildcards.
Here is an example. Say you want a stricter rule that flags any link with "gift" or "nitro" in the domain:
https?://[^\s/]*(?:gift|nitro)[^\s/]*
That also catches Discord's real gift links, so you would add these allow list entries:
discord.gift
discord.com
Discord does not document exactly how allow list entries are checked against a regex match. Two public reports, one on Discord's feedback forum and one on the developer docs GitHub, describe allowed terms letting other content through in the same message.
So test both ways. A real https://discord.gift/... link should pass, and a fake such as https://discord.gift.example.com should still be caught. If it is not, drop the broad rule and rely on narrow patterns like the eight above, which do not match official domains at all.
🧪 How to Test Patterns Safely
A broken pattern can block ordinary chat across your whole server. Discord's help centre is blunt that regex is advanced and that a bad pattern can stop members sending acceptable messages.
- Check syntax in a Rust tester. Discord recommends Rustexp. Regex101 also has a Rust flavour option.
- Paste both kinds of sample. Use scam links you have seen and real links your members post, and confirm only the scams match.
- Save in alert-only mode. Leave Block message off at first.
- Test from a normal account. Admins and Manage Server members are always exempt, so your own test messages will never trigger. Discord suggests sending messages from a non-moderator account.
- Watch the alerts channel. Each alert shows the matching pattern and rule name, which makes false positives easy to trace.
AutoMod alerts show the exact pattern that fired. Image: Discord.
Discord AutoMod Regex Limits
| Limit | Value | Source |
|---|---|---|
| Custom keyword rules per server | 6 | Developer docs |
| Spam, mention spam, flagged words, member profile rules | 1 each | Developer docs |
| Regex patterns per rule | 10 | Developer docs and help centre |
| Characters per regex pattern | 260 (help centre still says 75) | Developer docs |
| Keywords per rule | 1,000, up to 60 characters each | Developer docs and help centre |
| Allow list entries | 100 per custom rule, 1,000 for flagged words | Developer docs |
| Exempt roles / channels | 20 / 50 | Developer docs |
| Unique mentions limit | up to 50 | Developer docs and help centre |
| Block message custom text | 150 characters | Developer docs and help centre |
| Timeout length | up to 4 weeks | Developer docs |
| Regex flavour | Rust, no backreferences | Developer docs and help centre |
The 75 versus 260 conflict is worth knowing. A change to Discord's developer docs on GitHub (pull request 5670) raised the regex length limit from 75 to 260 characters, but the help centre article was never updated. Every pattern on this page is under 260 characters. If Discord's form rejects one as too long, split its alternatives across two lines.
Regex also works in member profile rules. Discord's help centre covers Block Words in Member Profile Names under Safety Setup, and the developer docs list regex patterns for that rule type too.
False Positives and Troubleshooting
"Invalid syntax" when saving
Discord uses Rust regex. Lookaheads, lookbehinds and backreferences do not work. Rewrite the pattern with plain alternatives, then test it in Rustexp.
"Compile size exceeded limit"
The pattern is valid but too complex. Shorten character classes, remove large {n,m} ranges, or split it into two patterns.
The pattern never fires
You are probably testing from an exempt account. Also check the rule toggle is on and that the channel is not exempt.
Normal chat is being blocked
Switch the rule to alert only, find the pattern in the alert, and tighten it. Anchoring a pattern to https?:// or www. is the easiest way to stop it matching ordinary words.
What about flags?
Discord's FAQ says case-insensitive and Unicode flags are on by default and others can be enabled with a prefix like (?s). The rule editor's own hint says other flags are not supported. Test before relying on one.
A scam got through anyway
Expected. Regex only matches shapes it has been told about. Add the new spelling to your pattern, and use Report Issues under an alert when AutoMod flags something wrongly. Our "Discord Audit Log" wiki shows how to review AutoMod actions after an incident.
An alert from a custom rule with a timeout applied, and the Report Issues button. Image: Discord.
FAQ
Is Discord AutoMod regex free?
Yes. AutoMod is built into Discord and available on every server, with no bot or Nitro needed.
Does Discord AutoMod regex need a Community server?
No. Only the separate suspicious link filter is tied to Community servers.
Does AutoMod check bot messages?
Not from apps installed on your server. Discord says it does check messages from apps installed on a user's account, and actions apply to the user who ran the command.
Are these patterns recommended by Discord?
No. The regex examples in Discord's help centre cover email addresses, braille characters and Greek letters. The scam patterns here are ours.
Will regex stop every scam?
No. It catches known shapes. Pair it with Block Suspected Spam Content, verification levels and active moderators. Our "GTA 6 Scams" post shows how quickly scam wording changes around big releases.
For a full walkthrough of the other rules and sensible defaults, see our Discord AutoMod setup guide.
Summary
Discord AutoMod regex lets admins with Manage Server block scam links by pattern, using up to 10 Rust-flavour patterns per custom rule. Start with Block Suspected Spam Content, add narrow patterns for lookalike domains, IP grabbers and masked links, and run them in alert-only mode before blocking.
Test from a non-admin account, keep allow lists short, and expect scammers to find new spellings. Regex is one layer of protection, not the whole wall.
Sources
- AutoMod FAQ, Discord Help Centre
- Filter Messages Using Regular Expressions (Regex), Discord Help Centre
- Auto Moderation resource, Discord Developer Documentation
- Discord Patch Notes, November 9, 2026, Discord Blog
- Why was my message not delivered?, Discord Help Centre
- How to Protect Your Server from Raids 101, Discord Help Centre
- Add allow_list for keyword rule and bump regex keyword limit, discord-api-docs pull request 5670, GitHub
- AutoMod allowed words can bypass regex filtering rules for the whole message, Discord feedback forum
- discord-api-docs issue 7356 on allow list wildcards, GitHub
- The Anti-IP-Grabber Blocklist, GitHub

Comments
Sign in to join the conversation
Sign inNo comments yet
Be the first to share your thoughts!