You want stuff to block? I can hook you up.
# 410 gone for a long string of lowercase letters
# and/or numbers followed by an optional long extension
# to handle spam URLs like /spstyaaliti4csf6ne.desiringly
RewriteRule ^/?[a-z0-9]{12,30}(\.[a-z0-9]{8,30})?$ - [G,L]
# Fediverse instances asking for previews?
# Computer says, ‘fuck you.’
RewriteCond %{HTTP_USER_AGENT} Mastodon|Friendica|Pleroma|Akkoma|Misskey [nocase]
RewriteRule .* . [L,G]
ErrorDocument 403 "non serviam"
# Got referred here by Hacker News
# or a shitty search engine, social platform, or forum?
# Computer says, ‘fuck you.’
RewriteCond %{HTTP_REFERER} news.ycombinator.com [NC,OR]
RewriteCond %{HTTP_REFERER} facebook.com [NC,OR]
RewriteCond %{HTTP_REFERER} threads.net [NC,OR]
RewriteCond %{HTTP_REFERER} instagram.com [NC,OR]
RewriteCond %{HTTP_REFERER} bsky.app [NC,OR]
RewriteCond %{HTTP_REFERER} x.com [NC,OR]
RewriteCond %{HTTP_REFERER} reddit.com [NC]
RewriteRule .* . [redirect=402,last]
ErrorDocument 402 "Fuck you. Pay me."
RewriteCond %{HTTP_REFERER} 4chan.org [NC,OR]
RewriteCond %{HTTP_REFERER} forum.agoraroad.com [NC,OR]
RewriteCond %{HTTP_REFERER} twitter.com [NC]
RewriteRule .* . [redirect=403,last]
ErrorDocument 403 "Fuck off, Nazis."
RewriteCond %{HTTP_REFERER} kiwifarms.net [NC]
RewriteRule .* . [redirect=403,last]
ErrorDocument 403 "Chris Chan is Joshua Moon."
# This is a static site, assholes. Stop trying to look for shit to exploit.
RewriteRule \.php$ . [redirect=410,last]
RewriteRule \.aspx$ . [redirect=410,last]
RewriteRule \.asp$ . [redirect=410,last]
RewriteRule \.jsp$ . [redirect=410,last]
ErrorDocument 410 "non serviam"
# Filched from Alex Schroeder
# source: https://alexschroeder.ch/view/2025-03-21-defence-summary
RewriteCond "%{HTTP_USER_AGENT}" "!archivebot|^gwene|wibybot" [nocase]
RewriteCond "%{HTTP_USER_AGENT}" "bot|crawler|spider|ggpht|gpt" [nocase]
RewriteRule .* . [redirect=410,last]
ErrorDocument 410 "non serviam"
# Deny the image scraper
# https://imho.alex-kunz.com/2024/02/25/block-this-shit/
RewriteCond "%{HTTP_USER_AGENT}" "Firefox/72.0" [nocase]
RewriteRule .* . [redirect=410,last]
ErrorDocument 410 "non serviam"
# Google, SEO bot, or AI bot?
# Computer says, ‘fuck you.’
RewriteCond %{HTTP_USER_AGENT} (Headless) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (360Spider) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (AdsBot-Google) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (AdsBot-Google-Mobile) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (AhrefsBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (AhrefsSiteAudit) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Amazonbot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Applebot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Applebot-Extended) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (AwarioRssBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (AwarioSmartBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Baiduspider) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (BingPreview) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Bytespider) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (CCBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (ChatGPT) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (ChatGPT-User) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Claude-Web) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (ClaudeBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (DataForSeoBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Diffbot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (DiscordBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Dotbot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (FacebookBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (FacebookExternalHit) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Feedfetcher-Google) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (GPTBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Google-Extended) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Google-Safety) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (GoogleOther) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Googlebot-Image) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Googlebot-Mobile) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Googlebot-News) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Googlebot-Video) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (HaoSouSpider) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (ImagesiftBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (LinkedInBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (MJ12bot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Omgilibot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (PerplexityBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Pinterestbot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Rogerbot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (SemrushBot-BA) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (SemrushBot-COUB) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (SemrushBot-CT) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (SemrushBot-SI) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (SemrushBot-SWA) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Semrushbot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (SiteAuditBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (SplitSignalBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (TelegramBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Turnitin) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Twitterbot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Yandex) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (YandexBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (YandexImages) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (YandexRenderResourcesBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (YouBot) [NC]
RewriteCond %{HTTP_USER_AGENT} (adbeat_bot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (beskuttlebot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (bingbot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (cohere-ai) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (magpie-crawler) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (msnbot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (msnbot-media) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (omgili) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (peer39_crawler) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (redditbot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (skutlbot) [NC]
RewriteRule .* . [redirect=402,last]
ErrorDocument 402 "Fuck you. Pay me."