Oggi mi sono scontrato con il robots.txt della community di salesforce.
La community ha un robots.txt di default
#
# default robots.txt for sfdc communities sites
#
# For use by salesforce.com
#
User-agent: * # applies to all robots
Allow: / # allow all
Disallow: */secur/forgotpassword.jsp?*
Per modificare il robots.txt segui questa procedura
Vedi anche come validare un robots.txt
Se vuoi modificare le impostazioni del site o della community da visual studio code devi prima scaricare i metadati dei site
<types>
<members>*</members>
<name>CustomSite</name>
</types
Una volta scaricati i metadati e aperti troverai il seguente codice
<?xml version="1.0" encoding="UTF-8"?>
<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
<active>true</active>
<authorizationRequiredPage>Unauthorized</authorizationRequiredPage>
<bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
<changePasswordPage>ChangePassword</changePasswordPage>
<fileNotFoundPage>FileNotFound</fileNotFoundPage>
<inMaintenancePage>InMaintenance</inMaintenancePage>
<indexPage>IdeasHome</indexPage>
<masterLabel>First</masterLabel>
<portal>Customer Portal</portal>
<requireInsecurePortalAccess>false</requireInsecurePortalAccess>
<robotsTxtPage>RobotsTxt</robotsTxtPage>
<siteAdmin>mylogin@myco.com</siteAdmin>
<subdomain>mydomain</subdomain>
</CustomSite>
Il valore che interessa la robots.txt è “robotsTxtPage”