Secure method to prevent search engines like Google, Yandex, Yahoo, and others from indexing your torrent website
-------------------------------------------------------------------------------------------------------------------
1. robots.txt file
Place a file named robots.txt in the root of your website with the following content:
User-agent: *
Disallow: /
This tells all search engine bots not to crawl or index any part of your site.
Important: This is only a request, not a technical block. Some bots may ignore it.
2. Meta tags for no indexing:
Add the following <meta> tags inside the <head> section of every HTML page, or in your template:
<meta name="robots" content="noindex, nofollow">
You can also specify bots explicitly:
<meta name="googlebot" content="noindex, nofollow">
<meta name="yandex" content="none">
3. Block search engine bots via .htaccess (Apache servers only):
# Block Googlebot
RewriteCond %{HTTP_USER_AGENT} Googlebot [NC,OR]
# Block Yandex bot
RewriteCond %{HTTP_USER_AGENT} Yandex [NC,OR]
# Block Bingbot
RewriteCond %{HTTP_USER_AGENT} bingbot [NC,OR]
# Block Yahoo/Slurp
RewriteCond %{HTTP_USER_AGENT} Slurp [NC]
RewriteRule ^.* - [F,L]
4. Block known bot IP ranges
Some bots (like Google) crawl from known IP ranges. You can block them with .htaccess or your server firewall:
Example with Apache 2.4:
<RequireAll>
Require all granted
Require not ip 66.249.0.0/16 # Googlebot range
</RequireAll>
Or with iptables (Linux firewall):
iptables -A INPUT -s 66.249.0.0/16 -j DROP
You can find updated IP ranges in public bot documentation.
5. Restrict content to logged-in users only
This is one of the most effective ways to prevent indexing.
If your torrent content is only visible to registered users, then bots (which can’t log in) will not see or index anything — even if they try.
6. Reverse DNS and User-Agent validation (PHP example):
This adds another layer of protection by verifying that the IP address and User-Agent match:
This blocks fake bots pretending to be Googlebot, Yandex, etc., if their IP doesn’t resolve properly.
-------------------------------------------------------------------------------------------------------------------
1. robots.txt file
Place a file named robots.txt in the root of your website with the following content:
User-agent: *
Disallow: /
This tells all search engine bots not to crawl or index any part of your site.
Important: This is only a request, not a technical block. Some bots may ignore it.
2. Meta tags for no indexing:
Add the following <meta> tags inside the <head> section of every HTML page, or in your template:
<meta name="robots" content="noindex, nofollow">
You can also specify bots explicitly:
<meta name="googlebot" content="noindex, nofollow">
<meta name="yandex" content="none">
3. Block search engine bots via .htaccess (Apache servers only):
# Block Googlebot
RewriteCond %{HTTP_USER_AGENT} Googlebot [NC,OR]
# Block Yandex bot
RewriteCond %{HTTP_USER_AGENT} Yandex [NC,OR]
# Block Bingbot
RewriteCond %{HTTP_USER_AGENT} bingbot [NC,OR]
# Block Yahoo/Slurp
RewriteCond %{HTTP_USER_AGENT} Slurp [NC]
RewriteRule ^.* - [F,L]
4. Block known bot IP ranges
Some bots (like Google) crawl from known IP ranges. You can block them with .htaccess or your server firewall:
Example with Apache 2.4:
<RequireAll>
Require all granted
Require not ip 66.249.0.0/16 # Googlebot range
</RequireAll>
Or with iptables (Linux firewall):
iptables -A INPUT -s 66.249.0.0/16 -j DROP
You can find updated IP ranges in public bot documentation.
5. Restrict content to logged-in users only
This is one of the most effective ways to prevent indexing.
If your torrent content is only visible to registered users, then bots (which can’t log in) will not see or index anything — even if they try.
6. Reverse DNS and User-Agent validation (PHP example):
This adds another layer of protection by verifying that the IP address and User-Agent match:
$ip = $_SERVER['REMOTE_ADDR'];
$host = gethostbyaddr($ip);
if (strpos($host, 'googlebot.com') === false && strpos($_SERVER['HTTP_USER_AGENT'], 'Googlebot') !== false) {
header("HTTP/1.1 403 Forbidden");
exit;
}This blocks fake bots pretending to be Googlebot, Yandex, etc., if their IP doesn’t resolve properly.
Last edited by coco on 2025-07-07 20:05:34