I am trying to set return url for site after logout.

<li><a href="{!$Site.Prefix}/secur/logout.jsp?retUrl={!$Page.Comm_Login}">Logout</a></li> 

It is working fine for one sandbox but for other sandbox redirected to http://www.salesforce.com/in/?ir=1 instead of mentioned page.

Need your advice.

Thank you -P

  • Is it returning to Salesforce brand page heedless of whatever page you pass to retURL parameter?
    – Seesh
    Sep 11, 2015 at 20:45

1 Answer 1


I have done small change in href and now its working fine for me.

I have added site base url instead of partial url.

Please refer below line of code

<li><a href="{!$Site.Prefix}/secur/logout.jsp?retUrl={!$Site.BaseSecureUrl}/Comm_Login">Logout</a></li> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.