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.

anti-linkanti-spammoderation9bot
Reading time: 6 min

How it works in practice

Side-by-side simulation of a WhatsApp group. Without 9bot, Ethan posts invites to other groups and a suspicious .apk file, and Mike opens the file. With 9bot, the store website link, which is on the whitelist, goes through; the invite and the file are deleted with a custom warning and a strike, and on the third strike Ethan is removed from the group.

Want to automate your WhatsApp groups? Discover 9bot and set up alerts, commands and integrations in minutes. Free trial

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

  1. In the side menu, click Groups.
  2. Type the group name in the search box.
  3. 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.
9bot Groups screen with a search for Seu Grupo and the group selected
Step 1: search for the group and click its card. The badge at the top confirms the selected 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

  1. Click Automations in the side menu.
  2. Find the Link Moderation card ("Block or approve links").
  3. Click Configure to open the Anti-Link window.
9bot Automations screen with the Link Moderation card and the Configure button
Step 2: in Automations, open Link Moderation with the Configure button.

Step 3: Choose the Anti-Link mode and rules

  1. 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.
  2. 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.
  3. Edit the Anti-link warning message. Use @{user} to mention the member, {groupName} for the group name and {link} for the detected link.
  4. Click Save.
9bot Anti-Link window with Moderation Mode, filter options and warning message
Step 3: Anti-Link window with the moderation mode, the filter options and the warning message.

Step 4: Build the whitelist and block files

  1. 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.
  2. In Whitelist of Allowed Links, add one domain per line. A domain allows any address inside it: imgur.com allows imgur.com/abc and www.imgur.com/a/xyz.
  3. Click Save.
9bot Anti-Link with Block documents and files on and a whitelist with imgur.com and docs.google.com
Step 4: document blocking on and two domains allowed in the whitelist.

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

9bot Anti-Link in Remove member mode with Allow text only ticked
Strict setup: Remove member mode with Allow text only ticked.

Step 5: Connect links to the warning system

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

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.

9bot Punishment Ladder with three warnings and a kick on the 4th warning
Punishment Ladder: three warnings and a kick on the 4th warning.

Step 6: Check the logs

  1. Click Moderation in the side menu.
  2. 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.
9bot Moderation screen with Moderation Deletion Logs on the Anti-Link tab
Step 6: log of the messages removed by Anti-Link.

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

Anti-Link options at a glance
OptionWhat it doesWhen to use it
Delete messageDeletes the message with a link that is not allowedOpen groups where you only want to clean up spam
Remove memberDeletes the message and removes the senderGroups with a history of scams and raids
Allow social media linksLets Facebook, Instagram, Twitter, YouTube, TikTok and similar throughCreator and networking communities
Block documents and filesStops PDF, DOCX, ZIP, RAR, APK sent as documentsLarge groups, against malicious files
Allow text onlyBlocks photos, videos, audio, stickers and documentsAnnouncement groups or text only discussion
Warning messageTells the group when a link is removedWhen you want members to see the rule
WhitelistAllows specific domains and everything inside themYour 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.

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

  1. Enter the group using a secondary test account (that does not have admin rights).
  2. Attempt to send a forbidden link (e.g., `randomwebsite.com`).
  3. Confirm that the 9bot deletes the message immediately and sends the configured warning.
  4. 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.

Moderate your WhatsApp groups with less manual work: set up rules, alerts and automated actions with 9bot. 50% OFF: Automate moderation

Frequently asked questions

Where can I see the links 9bot deleted?
In Moderation > Moderation Deletion Logs, on the Anti-Link tab. That is where the messages removed automatically by the filter are listed.
What is 9bot Link Moderation?
It is an automation that monitors group messages in real-time and instantly deletes any link sent by regular members, preventing the spread of spam or scams.
How does the website whitelist work on WhatsApp?
The whitelist (allowed list) registers safe website addresses, such as your official business portal or social networks. Any link on the whitelist will not be deleted, allowing authorized content to circulate.
Can I block audio files, images, or PDFs?
Yes. In the 9bot Dashboard, you can configure the block for specific documents and files or even enable "Text-only mode," which prevents regular participants from sending any media or document.
Does 9bot notify the user when it deletes a link?
Yes. You can configure a customized warning message. The bot alerts the member in a direct and helpful way right in the group, showing which rule they broke and what to do next.
How does the warning system work for links?
In Automations > Warning Triggers, the Forbidden Links trigger adds warnings for each forbidden link. The Punishment Ladder defines what happens: by default, three warnings and, on the 4th warning, the member is removed from the group (they can return).
Are group administrators affected by the filter?
No. Group administrators have full permissions and can send links, files, or media freely without 9bot executing any block or warning.
How do I stop people from sending links in a WhatsApp group?
WhatsApp itself only lets you limit the whole group to admin-only messages. To keep the conversation open and block only links, add 9bot as an admin, turn on Link Moderation (Anti-Link) in Automations and choose whether to delete the message, warn or remove the member.
Can I allow some links and block all the others?
Yes. Add trusted domains, such as your website or official social profiles, to the whitelist. 9bot lets those links through and deletes any other link sent by regular members.
Does 9bot need to be a group admin to filter links?
Yes. WhatsApp only allows admins to delete other members’ messages and remove participants, so 9bot must be promoted to admin in the group before the filter can act.
Can I try the link filter for free?
Yes. 9bot offers a 7-day trial, so you can connect your group, enable Link Moderation and test it with a secondary account before choosing a plan.
What is anti-link on WhatsApp?
Anti-link is an automatic filter that deletes links posted by regular members of a group. WhatsApp doesn't offer it natively; it comes from moderation bots such as 9bot's Link Moderation, which also lets you whitelist trusted domains.
How do I automatically delete invite links to other groups?
Turn on 9bot's Link Moderation and leave chat.whatsapp.com off the whitelist. Invites to other groups posted by regular members are then deleted automatically, and you can add strikes for anyone who keeps trying.