How to Automatically Filter Links & Files on WhatsApp
Configure Link Moderation and file blocking in 9bot to shield your group against spam, scams, and malware automatically.
How it works in practice

Step by step in the 9bot dashboard
The full path is Groups > your group > Automations > Link Moderation > Configure. The screenshots below come from the real dashboard, in a test group called "Seu Grupo". The numbers on the images follow the order of the clicks.
Step 1: Select the group
- In the side menu, click Groups.
- Type the group name in the search box.
- Click the group card. A badge with its name appears at the top of the dashboard, and everything you configure next applies only to that group.

Quick checkpoint: the number connected to 9bot must be an admin of the group on WhatsApp. Without that it cannot delete messages or remove members. See the WhatsApp group admin powers to understand what each permission allows.
Step 2: Open Link Moderation
- Click Automations in the side menu.
- Find the Link Moderation card ("Block or approve links").
- Click Configure to open the Anti-Link window.

Step 3: Choose the Anti-Link mode and rules
- In Moderation Mode, choose Delete message (deletes the link) or Remove member (deletes it and removes the person from the group). Disabled turns the filter off.
- Tick the options that suit the group: allow social media links, block documents and files, allow text only and send a warning message when removing a link.
- Edit the Anti-link warning message. Use
@{user}to mention the member,{groupName}for the group name and{link}for the detected link. - Click Save.

Step 4: Build the whitelist and block files
- Tick Block documents and files to stop PDF, DOCX, ZIP, RAR, APK and other files sent as documents. Photos, videos, audio and stickers sent in their normal format still go through.
- In Whitelist of Allowed Links, add one domain per line. A domain allows any address inside it:
imgur.comallowsimgur.com/abcandwww.imgur.com/a/xyz. - Click Save.

For a stricter group, use Remove member with Allow text only. Photos, videos, audio, stickers and documents are then blocked too.

Step 5: Connect links to the warning system
- Still in Automations, open the Warning Triggers tab.
- On the Forbidden Links trigger, click Configure and keep Apply warning for this trigger ticked.
- Set the Warning Count that each forbidden link adds (the default is 1).
- Choose whether to Delete detected message and Send moderation alert to admins.
- In Forbidden Domains, list the domains that should trigger a warning.

The Punishment Ladder tab defines what happens at each accumulated warning. By default, the 1st, 2nd and 3rd are warnings with their own message (the 3rd says the next one removes) and the 4th is a kick, after which the person can return. In the Whitelist tab you mark members who never receive warnings. To deal with people who keep pushing anyway, see how to handle difficult members and conflict in a group.

Step 6: Check the logs
- Click Moderation in the side menu.
- Scroll to Moderation Deletion Logs and open the Anti-Link tab to see the messages deleted by the filter. The Anti-Spam tab shows the ones removed by Anti-Spam.

Quick checkpoint: always click Save before closing the window. To review the rest of your moderation routine, use the moderation checklist for large groups.
Anti-Link options at a glance
| Option | What it does | When to use it |
|---|---|---|
| Delete message | Deletes the message with a link that is not allowed | Open groups where you only want to clean up spam |
| Remove member | Deletes the message and removes the sender | Groups with a history of scams and raids |
| Allow social media links | Lets Facebook, Instagram, Twitter, YouTube, TikTok and similar through | Creator and networking communities |
| Block documents and files | Stops PDF, DOCX, ZIP, RAR, APK sent as documents | Large groups, against malicious files |
| Allow text only | Blocks photos, videos, audio, stickers and documents | Announcement groups or text only discussion |
| Warning message | Tells the group when a link is removed | When you want members to see the rule |
| Whitelist | Allows specific domains and everything inside them | Your site, your store and trusted tools |
Recommended setups
- Sales group: Delete message, Block documents and files and your store domain in the whitelist. Customers talk freely and only your link circulates.
- Announcement group: Allow text only with the warning message on. Nothing but text gets through.
- Creator community: Delete message with Allow social media links ticked, so members can show their profiles without opening the door to invites from other groups.
- Job openings group: Remove member with Block documents and files, since fake links and files are how scams get in. See more in job openings group without scams.
What the member sees
When someone sends a link outside the whitelist, the message disappears from the group. If the warning is on, 9bot posts the message you configured, for example "⚠️ @Marcos, links are not allowed in this group!". If the Forbidden Links trigger is on, the warning goes into the Punishment Ladder and the member gets the message for that step. Want to try it in your group? Start with the 9bot plans with a 7-day trial.
Want this running in your group today? 9bot's anti-link, file filter and strikes are included in the plan. Start the 7-day trial, connect your bot number and turn on Link Moderation in a few minutes. Start now for 7 days. New to bots? Read the WhatsApp group bot guide.
How to block links in a WhatsApp group (anti-link)
WhatsApp has no built-in option to block only links. Under Group permissions, an admin can turn off Send new messages, but then only admins can post and the whole conversation stops, not just the links. Admins can also remove another member's message with Delete for everyone, as long as they do it within two days of it being sent (WhatsApp Help Center).
Anti-link is the name for a filter that automatically deletes links posted by anyone who isn't an admin. In 9bot it's called Link Moderation and lives under Automations. It handles three common situations:
- Scam and spam links: any link outside your whitelist is deleted as soon as it lands in the group.
- Invites to other groups: a
chat.whatsapp.com/…invite is just another link. If that domain isn't whitelisted, the anti-link filter removes the invite before anyone can poach your members. - Approved links: your website and official social profiles go on the whitelist and keep working as usual.
Admins-only messages (built-in)
- Locks the whole chat, not just links.
- No list of allowed links.
- No warning or penalty for repeat offenders.
9bot anti-link
- The conversation stays open to everyone.
- Only links outside the whitelist are deleted.
- Members get a warning, and repeat offenders get strikes.
For anti-link to work, the WhatsApp number connected to 9bot must be a group admin, because WhatsApp only lets admins delete other members' messages. The full setup is in the steps below.
Why automatic link and file filtering makes a difference
Anyone who manages a WhatsApp community knows how frustrating it is: as soon as the group grows, bad actors start spreading phishing links, invitations to competing groups, malware, and suspicious files.
This spam destroys the community's trust. Members begin silencing or leaving the group because they feel exposed or simply tired of the noise. Moreover, manual moderation is impossible, as administrators cannot watch the chat 24/7.
Automatic protection of links and attachments solves the problem immediately: it intercepts and deletes unwanted content the millisecond it is posted, maintaining order without requiring administrators to monitor their screens continuously.
The problem in practice
In open or large-scale groups (such as news portals or customer communities), sharing suspicious links or files is the fastest way to compromise everyone's security. Redirections to viruses, scams, and financial fraud heavily damage your brand's credibility.
Without an active filter, a single wrong click from an unsuspecting member can trigger a security crisis. Surgically blocking dangerous file formats and restricting generic links ensures that only legitimate, safe conversations thrive.
Automatic filtering is not meant to restrict healthy discussions, but to create invisible shields that repel malware and spam bots while keeping genuine conversations safe.
What you will configure
By the end of this tutorial, you will have:
- An active Link Filter (Anti-Link) with a whitelist of approved domains (e.g., your website and social media).
- A complete block on sensitive or potentially dangerous files (such as executable documents).
- Automated progressive warnings (strike system) for repeat offenders.
- A practical test to confirm that the moderation is operating on the correct group.
Before you begin
- A WhatsApp group connected to 9bot.
- Access to the 9bot Dashboard.
- The correct group selected in the Groups tab.
- Admin permissions granted to the 9bot in WhatsApp settings.
- A list of trusted websites that your group can share (whitelist).
The filter as a smart receptionist
Think of the 9bot filter as the smart lobby receptionist of a secure corporate building.
If a visitor arrives carrying unsolicited advertising flyers (spam) or suspicious packages that could pose a risk, the receptionist stops them at the entrance. However, if a visitor shows an authorized partner company ID (whitelist), they pass through with no issues.
This way, the building remains busy and productive, but completely free of disruptions and security hazards.
Secure group checklist
- Anti-Link filter enabled and configured to delete forbidden messages immediately.
- Brand domains added to the allowed links whitelist.
- Strike System active to educate and penalize repeat offenders fairly.
- Direct warning message configured with a helpful tone, pointing users to the rules.
- Moderation report reviewed weekly to refine restricted words and links.
Test it now in your group
- Enter the group using a secondary test account (that does not have admin rights).
- Attempt to send a forbidden link (e.g., `randomwebsite.com`).
- Confirm that the 9bot deletes the message immediately and sends the configured warning.
- Try sending a link from your whitelist and check that it goes through without being deleted.
If the bot deleted the forbidden link and spared the whitelisted one, your group is successfully protected. Otherwise, verify if the test account has admin privileges (bots do not block admins) or if the bot lacks admin permissions on WhatsApp.
Read also
