Back to Blog
How-toNovember 17, 20262 min read

How to block links in a Telegram group

Most group spam is a link. A link filter removes it before members click, while still letting through the sites your group actually uses.

How to block links in a Telegram group

To block links in a Telegram group, add a moderation bot as an admin with permission to delete messages and turn on a link filter. Choose which links to stop, such as Telegram invite links, URL shorteners or all external sites, add trusted domains to an allow list, keep admins exempt, and decide whether a broken rule deletes the message, warns, mutes or bans the sender.

What Telegram can do on its own

Telegram's own group permissions let an admin stop members from sending links at all, through the setting for embedded links. That is a blunt switch: it treats a link to your own website the same way as a link to a scam, and it gives you no way to let a regular member share a useful article. For many groups that is too strict, and for busy groups it is not precise enough.

Step 1: add the bot as an admin

A bot can only remove a message if it is an admin in the group with the right to delete messages. To restrict or ban people who break the rule, it also needs the right to ban users. In BotLaunch you add the bot to the group once and configure everything else from the web dashboard.

Step 2: choose which links to stop

The link protection module in BotLaunch works with rules. Each rule targets a kind of link and has its own action:

  • Telegram links: t.me links and @mentions of other channels, the usual way spammers advertise their own groups.
  • External links: any website outside Telegram.
  • All links, or custom patterns you write yourself.

Two separate switches cover the worst cases: one deletes group invite links on sight, the other deletes links behind URL shorteners. A shortened link hides where it goes, so the bot refuses it rather than following it.

Step 3: allow what your group uses

Add the domains your members share for good reasons to the allow list: your own site, a documentation site, a news source you trust. Links to those pass every rule. A block list does the opposite for domains you never want to see. You can also cap how many links one message may carry.

Step 4: decide who is exempt

Admins are exempt by default, so announcements are never deleted. You can also exempt Telegram Premium members, and set a waiting period so a new member cannot post links during their first minutes in the group. That last setting alone stops the common pattern of joining and posting a link straight away.

Step 5: pick the action

For each rule, choose what happens: delete the message, warn the sender, mute them for a time, or ban them. A sensible start is to delete invite links and shortened links, and warn on other external links, then tighten the rules if spam continues. Combine the link filter with CAPTCHA for new members and an anti-flood rule, and most automated spam never reaches the chat.

Frequently asked questions

Can I block links but allow my own website?

Yes. Add your domain to the allow list, and links to it pass every rule.

Can new members be stopped from posting links?

Yes. Set a waiting period, and a member cannot post links until that many minutes after joining.

What permissions does the bot need?

It must be a group admin with the right to delete messages, and the right to ban users if a rule mutes or bans.

Are admins affected by the link filter?

No, admins are exempt by default, so announcements and pinned posts stay.

Share this article