On 16. 10. 2026 12:03, Daniel Sahlberg wrote:
A little late to the party but would it also make sense to add a
robots.txt file? I realise they work in slightly different ways.
[[[
User-agent: *
Disallow: /
]]]

How about --record-only "merging" these differences in publish to
prevent accidental merge? (I saw the later SERVER_NAME commit but we
might prevent it from even appearing in publish).


If we can make sure that SERVER_NAME is definitely set as expected, then this can and should be merged to .../publish. Maintaining a file only on one branch, as in the case of your robots.txt proposal, will surely blow up on us sometime in the future. Using --record-only then modifying the file on the staging branch will cause a conflict on a future merge to the publish branch.

However, I find this change problematic:

 # Staging site only
-<IfModule mod_headers.c>
+<If "%{SERVER_NAME} == 'subversion-staging.apache.org'">
     Header set X-Robots-Tag "noindex, nofollow"
-</IfModule>
+</If>


The logic should be inverted so that we only allow indexing on the main site, not only disallow it on the staging site. Who knows what branches we'll create in future.

I'm guessing the <IfModule> condition was removed in order to fail hard and fast if the module isn't enabled, so that's fine.

-- Brane


Den fre 16 okt. 2026 kl 11:43 skrev<[email protected]>:
Author: ivan
Date: Fri Oct 16 09:43:56 2026
New Revision: 1939149

Log:
In site/staging: Try to implement INFRA suggestion to hide subversion-staging 
site
from indexing via .htaccess. See INFRA-28512.

NOTE: This changes **should not** merged to publish.

.htaccess: Add `Header set X-Robots-Tag "noindex, nofollow"`.

[1]:https://issues.apache.org/jira/browse/INFRA-28512

Modified:
    subversion/site/staging/.htaccess

Modified: subversion/site/staging/.htaccess
==============================================================================
--- subversion/site/staging/.htaccess   Fri Oct 16 09:38:10 2026        
(r1939148)
+++ subversion/site/staging/.htaccess   Fri Oct 16 09:43:56 2026        
(r1939149)
@@ -14,3 +14,7 @@ RedirectMatch permanent ^/issue-tracker(
  RedirectMatch 
^/issue[^A-Za-z0-9]?(\d+)$https://issues.apache.org/jira/browse/SVN-$1
  RewriteRule ^/?download(\.html)?/?$ /download.cgi [PT]

+# Staging site only
+<IfModule mod_headers.c>
+    Header set X-Robots-Tag "noindex, nofollow"
+</IfModule>

Reply via email to