Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to have hyperlink on my VF page and this page has to be shown on customer portal. The hyperlink will imitate logout functionality. I used following url "/secur/logout.jsp" but it is not working. Am I missing anything here?

share|improve this question
up vote 9 down vote accepted

This should work:


Its what salesforce generates when you set up a site.

share|improve this answer
+1 .Glad to see this answer ! – Mohith Shrivastava Feb 14 '13 at 9:02

Use href="/secur/logout.jsp" in anchor tag

and if u want to do in ccontroller use

return new PageReference('/secur/logout.jsp');

Hope this will work for u:-)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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