How to use of frontdoor.jsp to Log in using Session Id to Salesforce and Experience Cloud Site

Execute the following apex in Anonymous Apex Execute Window in Developer Console.

String strURL = System.URL.getSalesforceBaseUrl().toExternalForm();
strURL += '/secur/frontdoor.jsp?sid=' + UserInfo.getSessionId().SubString(15);
System.debug( 'URL: ' +strURL );


Use the URL to access Salesforce.