„X-Robots-Tag“-HTTP-Header not configured with „noindex, nofollow“ since NC 26.0.0

Because “none” is indeed equivalent to “noindex, nofollow” for Google, but seems to be not supported by Bing and probably other search engines.
Look here: https://github.com/nextcloud/server/pull/36689

Since Nextcloud 26, the shiped .htaccess file is changed in some lines:

old:

    Header always set X-Robots-Tag "none"

new:

    Header always set X-Robots-Tag "noindex, nofollow"

old:

  # Add cache control for static resources
  <FilesMatch "\.(css|js|svg|gif|png|jpg|ico|wasm|tflite)$">
    Header set Cache-Control "max-age=15778463"
  </FilesMatch>

  <FilesMatch "\.(css|js|svg|gif|png|jpg|ico|wasm|tflite)(\?v=.*)?$">
    Header set Cache-Control "max-age=15778463, immutable"
  </FilesMatch>

new:

  # Add cache control for static resources
  <FilesMatch "\.(css|js|svg|gif|png|jpg|ico|wasm|tflite)$">
    <If "%{QUERY_STRING} =~ /(^|&)v=/">
      Header set Cache-Control "max-age=15778463, immutable"
    </If>
    <Else>
      Header set Cache-Control "max-age=15778463"
    </Else>
  </FilesMatch>

old:

ErrorDocument 403 /
ErrorDocument 404 /

new:

ErrorDocument 403 /index.php/error/403
ErrorDocument 404 /index.php/error/404

For people who disabled .htaccess parsing (with AllowOverride None) for performance reasons or nginx users must change their webserver conf files accordingly. I know how to do it for apache2 but have no clue how to translate this to nginx. I would say, that your “Workaround” is more than that, it looks like the solution.

1 Like