robots.txt Matching Works (RFC 9309)Search engines evaluate robots.txt by first selecting the most specific matching User-agent group (falling back to * if no specific agent matches), then finding all Allow and Disallow rules whose prefix or wildcard pattern (*, $) matches the request path. When multiple rules match, the longest rule wins (and Allow wins ties).
Disallow: / to hide sensitive staging sites - combine Basic Auth or IP allowlists with robots.txt.Sitemap: https://... URL at the bottom of robots.txt.