HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mitchellkrogza
nginx-ultimate-bad-bot-blocker
Shell2020–2025
mitchellkrogza / nginx-ultimate-bad-bot-blocker

nginx-ultimate-bad-bot-blocker

Nginx Block Bad Bots, Spam Referrer Blocker, Vulnerability Scanners, User-Agents, Malware, Adware, Ransomware, Malicious Sites, with anti-DDOS, Wordpress Theme Detector Blocking and Fail2Ban Jail for Repeat Offenders

7Distinct people
8Mentions
0Explicit recommenders
4.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Nginx Block Bad Bots, Spam Referrer Blocker, Vulnerability Scanners, User-Agents, Malware, Adware, Ransomware, Malicious Sites, with anti-DDOS, Wordpress Theme Detector Blocking and Fail2Ban Jail for Repeat Offenders

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year8 dated mentions

Observed mentions: 2020-02-24 18:02:29 UTC to 2025-03-18 12:35:49 UTC.

01232020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC110
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

8 sources
No, not nextcloud, it's the photos on my website. They are CC-BY-NC-ND-4.0 licensed, which genAI doesn't respect in any form. I added these in nginx.conf: map $http_user_agent $blocked_user_agent { default 0; "~*AI2Bot" 1; "~*AI2Bot-Dolma" 1; "~*Amazonbot" 1; "~*anthropic-ai" 1; "~*anthropic.com" 1; "~*Applebot" 1; "~*Applebot-Extended" 1; "~*AwarioBot" 1; "~*AwarioRssBot" 1; "~*AwarioSmartBot" 1; "~*Bytespider" 1; "~*CCBot" 1; "~*ChatGPT-User" 1; "~*ClaudeBot" 1; "~*Claude-Web" 1; "~*cohere-ai" 1; "~*cohere-training-data-crawler" 1; "~*DataForSeoBot" 1; "~*Diffbot" 1; "~*DuckAssistBot" 1; "~*FacebookBot" 1; "~*FriendlyCrawler" 1; "~*Googlebot-Ex
Read the rest
tended" 1; "~*Google-CloudVertexBot" 1; "~*Google-Extended" 1; "~*GoogleOther" 1; "~*GoogleOther-Image" 1; "~*GoogleOther-Video" 1; "~*GPTBot" 1; "~*iaskspider/2.0" 1; "~*ICC-Crawler" 1; "~*ImagesiftBot" 1; "~*img2dataset" 1; "~*ISSCyberRiskCrawler" 1; "~*Kangaroo Bot" 1; "~*Meltwater" 1; "~*Meta-ExternalAgent" 1; "~*Meta-ExternalFetcher" 1; "~*OAI-SearchBot" 1; "~*Omgili" 1; "~*Omgilibot" 1; "~*openai.com" 1; "~*PanguBot" 1; "~*peer39_crawler" 1; "~*PerplexityBot" 1; "~*PetalBot" 1; "~*Scrapy" 1; "~*Seekr" 1; "~*SemrushBot" 1; "~*SemrushBot-OCOB" 1; "~*Sentibot" 1; "~*Sidetrade indexer bot" 1; "~*Timpibot" 1; "~*TurnitinBot" 1; "~*VelenPublicWebCrawler" 1; "~*webmeup-crawler.com" 1; "~*Webzio-Extended" 1; "~*YouBot" 1; } and then in each site's config: location / { if ($blocked_user_agent) { access_log /var/log/nginx/blockedbot.log ncsa; return 401; } But it's far from perfect. For better results, https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blo... is probably better, but it was a tad too much for my needs.
In Moving away from US cloud services
Use nginx anti-bot[1] or product such as Fastly or Cloudflare anti-bot feature, which blocks content scrapping and only allows specific bots using rules or AI. Another option is to block VPN, cloud and hosting companies' ASNs. There is no benefit for you allowing someone to scrap your content apart from Bing and Google. The rest of the bots can die, or you will lose your content to scrappers. So finally, put it behind a paywall if possible. Of course, the paywall only works if you have good content or buying ads to promote it. Good luck, mate. [1]https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blo...
In Ask HN: Any way to ban GPT-4 and others from harvesting my content and data?
Same experience here, one spammer DOSing my site, always with similar patterns. I'm already behind Cloudflare and use https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blo... but I still have to identify and block them manually, which is annoying and a waste of time. Some IP-range blocks affected users so it's not fine grained enough. I wish I could identify, expose and sue them into oblivion, but the internet is too international and anonymous for this to be feasible. I also had to limit some site functionality because of this.
In Google Drive may restrict files identified as violating ToS

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.