-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
20 lines (18 loc) · 887 Bytes
/
.htaccess
File metadata and controls
20 lines (18 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Additional server-level protection against indexing
# This works on Apache servers (GitHub Pages uses different servers, but good to have)
<IfModule mod_headers.c>
# Send X-Robots-Tag header to prevent indexing
Header set X-Robots-Tag "noindex, nofollow, noarchive, nosnippet, noimageindex, notranslate"
</IfModule>
# Block common crawler user agents
<RequireAll>
Require all granted
Require not expr "%{HTTP_USER_AGENT} =~ /googlebot/i"
Require not expr "%{HTTP_USER_AGENT} =~ /bingbot/i"
Require not expr "%{HTTP_USER_AGENT} =~ /slurp/i"
Require not expr "%{HTTP_USER_AGENT} =~ /duckduckbot/i"
Require not expr "%{HTTP_USER_AGENT} =~ /baiduspider/i"
Require not expr "%{HTTP_USER_AGENT} =~ /yandexbot/i"
Require not expr "%{HTTP_USER_AGENT} =~ /facebookexternalhit/i"
Require not expr "%{HTTP_USER_AGENT} =~ /twitterbot/i"
</RequireAll>