Skip to content

Commit aa54d59

Browse files
committed
Add server-level protections to prevent search engine indexing
1 parent f1e8ce8 commit aa54d59

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

.htaccess

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Additional server-level protection against indexing
2+
# This works on Apache servers (GitHub Pages uses different servers, but good to have)
3+
4+
<IfModule mod_headers.c>
5+
# Send X-Robots-Tag header to prevent indexing
6+
Header set X-Robots-Tag "noindex, nofollow, noarchive, nosnippet, noimageindex, notranslate"
7+
</IfModule>
8+
9+
# Block common crawler user agents
10+
<RequireAll>
11+
Require all granted
12+
Require not expr "%{HTTP_USER_AGENT} =~ /googlebot/i"
13+
Require not expr "%{HTTP_USER_AGENT} =~ /bingbot/i"
14+
Require not expr "%{HTTP_USER_AGENT} =~ /slurp/i"
15+
Require not expr "%{HTTP_USER_AGENT} =~ /duckduckbot/i"
16+
Require not expr "%{HTTP_USER_AGENT} =~ /baiduspider/i"
17+
Require not expr "%{HTTP_USER_AGENT} =~ /yandexbot/i"
18+
Require not expr "%{HTTP_USER_AGENT} =~ /facebookexternalhit/i"
19+
Require not expr "%{HTTP_USER_AGENT} =~ /twitterbot/i"
20+
</RequireAll>

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ permalink: pretty
33
title: 'Volovyk'
44
description: 'Volovyk provides consulting in Azure, .NET Core, Delphi, Dart & Flutter, plus startup and mobile app development from Norway.'
55

6+
# Prevent search engine indexing
7+
robots: noindex, nofollow
68

79
home:
810
limit_services: 0

_layouts/default.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<meta charset="utf-8">
66
<title>{% if page.title %}{{page.title}}{% else %}{{ site.title | escape }}{% endif %}</title>
77
<meta name="viewport" content="width=device-width, initial-scale=1" />
8+
<!-- Prevent search engine indexing -->
9+
<meta name="robots" content="noindex, nofollow, noarchive, nosnippet, noimageindex, notranslate" />
810
<link rel="icon" type="image/png" href="{{ '/images/favicon-32x32.svg' | relative_url }}">
911
<!-- Google Fonts CDN -->
1012
<link rel="preconnect" href="https://fonts.googleapis.com">

robots.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
User-agent: *
2+
Disallow: /
3+
4+
# Block all crawlers from the entire site
5+
# This prevents indexing by Google, Bing, Yahoo, and other search engines

0 commit comments

Comments
 (0)