Published on 2025-08-07T06:18:08Z

TelegramBot

TelegramBot is the web fetcher for the popular messaging app Telegram. It is not a general-purpose crawler but an on-demand bot that visits a web page only when a user shares a link to it in a Telegram chat. Its purpose is to retrieve metadata like the title, description, and thumbnail image to generate the rich link preview that appears in the conversation. For website owners, this is beneficial as it makes your content more engaging when shared on the platform.

What is TelegramBot?

TelegramBot is the web crawler for the instant messaging platform Telegram. It functions as a preview generator, scanning URLs that users share in Telegram chats to create rich link previews. It is a link preview bot, not a full web crawler. The bot identifies itself in server logs with the user-agent string TelegramBot. It makes targeted, single-page visits triggered by user actions rather than systematically crawling entire websites.

Why is TelegramBot crawling my site?

TelegramBot is visiting your website because a user has shared a link to your content in a Telegram conversation. The frequency of visits is directly tied to how often your content is shared on the platform. The bot's visit is to generate a preview of the shared link. This is a standard and authorized activity for messaging and social platforms. You may see increased activity from this bot if your content becomes popular among Telegram's large user base.

What is the purpose of TelegramBot?

The purpose of TelegramBot is to enhance the user experience in the Telegram app by generating rich previews for shared links. These previews make conversations more engaging and informative by providing a visual representation of the linked content. The bot collects only the data necessary to generate these previews, focusing on page titles, images, and meta descriptions. This benefits both users and website owners; users get a better experience, while website owners receive more engagement when their content is shared attractively.

How do I block TelegramBot?

To prevent TelegramBot from generating previews of your content when it is shared, you can add a disallow rule to your robots.txt file. This will cause links to your site to appear as plain text URLs in Telegram.

To block this bot, add the following lines to your robots.txt file:

User-agent: TelegramBot
Disallow: /

How to verify the authenticity of the user-agent operated by Telegram?

Reverse IP lookup technique

To verify user-agent authenticity, you can use host linux command two times with the IP address of the requester.
  1. > host IPAddressOfRequest
    This command returns the reverse lookup hostname (e.g., 4.4.8.8.in-addr.arpa.).
  2. > host ReverseDNSFromTheOutputOfFirstRequest
If the output matches the original IP address and the domain is associated with a trusted operator (e.g., Telegram), the user-agent can be considered legitimate.

IP list lookup technique

Some operators provide a public list of IP addresses used by their crawlers. This list can be cross-referenced to verify a user-agent's authenticity. However, both operators and website owners may find it challenging to maintain an up-to-date list, so use this method with caution and in conjunction with other verification techniques.