Nur kurz und vielleicht von Interesse für jemanden anders als Vorlage meine üblicherweise verwendete .htaccess-Datei. Die Datei ist von einer Reihe von Quellen zum Teil abgekupfert und zum Teil durch Analyse der eigenen Logfiles selber erweitert.
Ausgesperrt werden hier Bots die nur Traffic verursachen aber keinen Nutzen bezüglich Suchmaschinen haben:
# Use HTTP Strict Transport Security to force client to use secure connections only Header always set Strict-Transport-Security "max-age=2592000; includeSubDomains; preload" # Content-Security-Policy #Header set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' https:; object-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; media-src 'self'; child-src 'self' https:; font-src 'self' data:; connect-src 'self'" #Header set X-Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' https:; object-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; media-src 'self'; child-src 'self' https:; font-src 'self' data:; connect-src 'self'" #Header set X-WebKit-CSP "default-src 'self'; script-src 'self' 'unsafe-inline' https:; object-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; media-src 'self'; frame-src 'self' https:; font-src 'self' data:; connect-src 'self'" # X-Frame-Options Header set X-Frame-Options "ALLOW-FROM https://www.example.com" # X-Content-Type-Options # prevent mime based attacks like drive-by download attacks, IE and Chrome Header set X-Content-Type-Options "nosniff" # Referrer Policy Header set Referrer-Policy "strict-origin" # Feature-Policy Header always set Feature-Policy "microphone 'none'; payment 'none'; sync-xhr 'self' https://www.example.com RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^SEOkicks [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^SEOkicks-Robot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^sistrix [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^MajesticSEO [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^BacklinkCrawler [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^xovi [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^XoviBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^MJ12bot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^spbot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^SearchmetricsBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^search17 [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^AhrefsBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^ia_archiver [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^TurnitinBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^SlySearch [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^findlinks [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^magpie-crawler [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^Pixray-Seeker [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^008 [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^Ezooms [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^lb-spider [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^WBSearchBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^psbot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^HuaweiSymantecSpider [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^EC2LinkFinder [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^htdig [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^SemrushBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^discobot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^linkdex.com [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^SeznamBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^EdisterBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^SWEBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^picmole [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^Yeti [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^Yeti-Mobile [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^PagePeeker [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^CatchBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^yacybot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^netEstateNECrawler [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^SurveyBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^COMODOSSLChecker [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^Comodo-Certificates-Spider [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^gonzo [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^schrein [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^AfiliasWebMiningTool [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^suggybot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^bdbrandprotect [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^BPImageWalker [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^Updownerbot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^lex [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^ContentCrawler [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^DCPbot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^KaloogaBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^MLBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^iCjobs [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^oBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^WebmasterCoffee [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^Qualidator [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^Webinator [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^Scooter [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^thunderstone [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^larbin [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^OpidooBOT [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^ips-agent [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^TinEye [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^UnisterBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^Unister [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^ReverseGet [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^DotBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^AhrefsBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^MauiBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^masscan [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^PetalBot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^Nimbostratus-Bot [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^crawler4j [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^http://site.ru [NC] RewriteRule ^.* - [F,L] RewriteCond %{HTTP_USER_AGENT} ^CCBot [NC] RewriteRule ^.* - [F,L]