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 this running in your group today? 9bot's anti-link, file filter and strikes are included in the plan. Start the 7-day free trial, connect your bot number and turn on Link Moderation in a few minutes. Start free 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.

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

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).

Step-by-step in the Dashboard

Step 1: Select the right group

  1. Access the 9bot Dashboard.
  2. Click on the Groups menu.
  3. Select the community where you want to apply the filtering rules.

Quick Checkpoint: Make sure the bot has the "Bot admin" tag active in the groups list. Without admin permissions on WhatsApp, 9bot will not be able to delete messages or remove abusive users.

Step 2: Configure Link Moderation

  1. Go to Automations.
  2. Locate and click configure on Link Moderation (or Configure Anti-Link modal).
  3. Enable the feature and choose the desired action (e.g., "Delete message" or "Remove member").

Quick Checkpoint: If your group relies on sharing social media links, enable the "Allow social media links" option to prevent legitimate Instagram or LinkedIn profiles from being deleted by mistake.

Automations > Link Moderation tab in the 9bot Dashboard.
Automations > Link Moderation tab in the 9bot Dashboard.

Step 3: Define the Whitelist and File Blocking

  1. In the allowed links Whitelist field, enter your company's domain (e.g., `yourwebsite.com`) and other approved sites.
  2. In the documents and files blocking area, check the option to restrict dangerous uploads or enable "Text-only mode" if the group is strictly for text conversations.
  3. Configure a custom warning message that 9bot will send to the group whenever it deletes a forbidden link.

Step 4: Connect to the Strike System and Reports

  1. Go to the Moderation menu and enable the Strike System.
  2. Set sending a forbidden link to trigger 1 strike, and set the progressive penalty (e.g., 3 strikes result in automatic removal).
  3. Save the settings and track the results under the Reports > Moderation tab to identify the main rule-breakers.

Quick Checkpoint: Don't forget to click save at the bottom of the page. An unsaved change will leave your old group rules running.

Moderation > Strike System tab in the 9bot Dashboard.
Moderation > Strike System tab in the 9bot Dashboard.

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

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 Strike System work for links?
You can link the sending of forbidden links to an automatic strike. Upon reaching the configured limit (e.g., 3 strikes), 9bot removes the member from the group completely autonomously, keeping spammers away.
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 free 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.