Skip to content

Blocking Bots on Your AVideo Platform

Daniel Neto edited this page Apr 18, 2025 · 3 revisions

🚫 How to Block Unwanted Bots from Your AVideo Site

To protect your AVideo site and make it run better, you can block bots (automated programs) that try to access your site without permission. Some bots are helpful (like Google), but many just slow down your site or scrape your content.

This guide shows how to block bad bots and allow good ones.


🛠 Steps to Set Up Bot Blocking

1. Open the Configuration File

  • Go to your AVideo folder on the server.
  • Find and open the file called configuration.php (it's inside the videos folder).

2. List the Bad Bots You Want to Block

  • Look for a line that starts with $global['stopBotsList'].
  • If it doesn’t exist, add this line with the bots you want to block:
$global['stopBotsList'] = array('headless', 'bot', 'spider', 'rouwler', 'Nuclei', 'MegaIndex', 'NetSystemsResearch', 'CensysInspect', 'slurp', 'crawler', 'curl', 'fetch', 'loader');

These names match parts of the visitor's browser (User-Agent). If a bot uses one of these, it will be blocked.

3. Allow Good Bots (Optional)

  • Some bots are helpful (like search engines). You can allow them by adding this line:
$global['stopBotsWhiteList'] = array('facebook', 'google', 'bing', 'yahoo', 'yandex', 'twitter');

Bots on this list will not be blocked, even if their name is in the block list above.

4. Save the File

  • After adding the lines above, save the file.

✅ What Happens Next?

  • Every time someone visits your site, the system checks if their browser looks like a bot.
  • If it finds a match in your blocked list, and not in the allowed list, it stops the request and shows a message:
    "Bot Found"

👨‍💻 Example

If a bot with user agent "MegaIndexBot" visits your site:

  • It matches "MegaIndex" in your block list ✅
  • It's not in your allowed list ❌
  • So it will be blocked

But if Google visits your site:

  • It matches "google" in the allowed list ✅
  • So it will be allowed, even if "bot" is in the blocked list

Clone this wiki locally