Skip to content

Commit ac344c2

Browse files
authored
Merge pull request #9635 from nextcloud/aling-nginx-robots-tag
Replace X-Robots-Tag header value with "noindex, nofollow"
2 parents fa5f9ea + 10d9cc6 commit ac344c2

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

admin_manual/installation/harden_server.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ These include:
197197
- Instructs some browsers to not sniff the mimetype of files. This is used for example to prevent browsers from interpreting text files as JavaScript.
198198
- ``X-XSS-Protection: 1; mode=block``
199199
- Instructs browsers to enable their browser side Cross-Site-Scripting filter.
200-
- ``X-Robots-Tag: none``
201-
- Instructs search machines to not index these pages.
200+
- ``X-Robots-Tag: noindex, nofollow``
201+
- Instructs search machines to not index these pages and not follow any links there.
202202
- ``X-Frame-Options: SAMEORIGIN``
203203
- Prevents embedding of the Nextcloud instance within an iframe from other domains to prevent Clickjacking and other similar attacks.
204204
- ``Referrer-Policy: no-referrer``

admin_manual/installation/nginx-root.conf.sample

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ server {
6969
client_body_buffer_size 512k;
7070

7171
# HTTP response headers borrowed from Nextcloud `.htaccess`
72-
add_header Referrer-Policy "no-referrer" always;
73-
add_header X-Content-Type-Options "nosniff" always;
74-
add_header X-Download-Options "noopen" always;
75-
add_header X-Frame-Options "SAMEORIGIN" always;
76-
add_header X-Permitted-Cross-Domain-Policies "none" always;
77-
add_header X-Robots-Tag "none" always;
78-
add_header X-XSS-Protection "1; mode=block" always;
72+
add_header Referrer-Policy "no-referrer" always;
73+
add_header X-Content-Type-Options "nosniff" always;
74+
add_header X-Download-Options "noopen" always;
75+
add_header X-Frame-Options "SAMEORIGIN" always;
76+
add_header X-Permitted-Cross-Domain-Policies "none" always;
77+
add_header X-Robots-Tag "noindex, nofollow" always;
78+
add_header X-XSS-Protection "1; mode=block" always;
7979

8080
# Remove X-Powered-By, which is an information leak
8181
fastcgi_hide_header X-Powered-By;

admin_manual/installation/nginx-subdir.conf.sample

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ server {
9292
client_body_buffer_size 512k;
9393

9494
# HTTP response headers borrowed from Nextcloud `.htaccess`
95-
add_header Referrer-Policy "no-referrer" always;
96-
add_header X-Content-Type-Options "nosniff" always;
97-
add_header X-Download-Options "noopen" always;
98-
add_header X-Frame-Options "SAMEORIGIN" always;
99-
add_header X-Permitted-Cross-Domain-Policies "none" always;
100-
add_header X-Robots-Tag "none" always;
101-
add_header X-XSS-Protection "1; mode=block" always;
95+
add_header Referrer-Policy "no-referrer" always;
96+
add_header X-Content-Type-Options "nosniff" always;
97+
add_header X-Download-Options "noopen" always;
98+
add_header X-Frame-Options "SAMEORIGIN" always;
99+
add_header X-Permitted-Cross-Domain-Policies "none" always;
100+
add_header X-Robots-Tag "noindex, nofollow" always;
101+
add_header X-XSS-Protection "1; mode=block" always;
102102

103103
# Remove X-Powered-By, which is an information leak
104104
fastcgi_hide_header X-Powered-By;

0 commit comments

Comments
 (0)