Welcome to Centmin Mod Community
Register Now

Best way to block bots from triggering the Xenforo forum search endpoint?

Discussion in 'Forum software usage' started by MaximilianKohler, Oct 1, 2026 at 3:47 PM.

  1. MaximilianKohler

    MaximilianKohler Member

    219
    10
    18
    Jun 23, 2023
    Ratings:
    +42
    Local Time:
    9:02 AM
    Please fill in any relevant information that applies to you: https://community.centminmod.com/th...an-apparent-version-issue-with-php-fpm.33032/

    ---

    ChatGPT analyzed my `/home/nginx/domains/forum.domain.com/log/access.log`and noted that bots like MJ12Bot were making expensive requests to the `/search/` endpoint. I don't recall reading anything in the tutorials about blocking this type of traffic.

    A quick search shows multiple avenues for blocking this type of bot traffic:

    * XF Bot Guard addon https://xenforo.com/community/resources/xf-bot-guard.10508/
    * Block `/search/` for logged-out users.
    * Use nginx config to block bots.
    * Cloudflare, robots.txt, or .htaccess
    * Other?

    I'm not sure which is the best, but the addon seems like the easiest option for someone like me with little knowledge of this stuff.

    This is the command GPT used to check and list the bots:
    Code:
    grep -iE '"GET /search/| "POST /search/' /home/nginx/domains/forum.domain.com/log/access.log | grep -oE '"[^"]+"$' | sort | uniq -c | sort -nr | head -20
      11585 "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
       9817 "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Reflectionbot/1.0; +https://reflection.ai/bot) Chrome/151.0.0.0 Safari/537.36"
       2709 "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.6943.141 Safari/537.36"
        882 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15 (Applebot/0.1; +http://www.apple.com/go/applebot)"
        424 "Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)"
        326 "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Claude-SearchBot/1.0; +searchbot@anthropic.com)"
        321 "Mozilla/5.0 (compatible; Bytespider; spider-feedback@bytedance.com) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.0.0 Safari/537.36"
        293 "Mozilla/5.0 (compatible; SERankingBacklinksBot/1.0; +https://seranking.com/backlinks-crawler)"
        291 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
        280 "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
        276 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
        268 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
        268 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        260 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
        257 "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
        254 "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
        247 "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
        247 "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
        243 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
        239 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
    
    GPT says:
    But I don't see that stated on the addon page, so perhaps GPT is hallucinating. I prodded GPT and uploaded the addon to it, and it agreed that an NGINX rule shouldn't be needed if you're using the addon.

     
    Last edited: Oct 1, 2026 at 5:12 PM