We've enabled communities and set up user profiles, access etc. There are no login flows nor SSO going on, everything is pretty standard apart from a custom login page (active site homepage). Email templates for welcome new user, forgot password and change password on the community are all set up and we use the default templates that have the merge field {!Community_URL}. In all 3 templates the value for this merge field gets replaced by a SF specific URL which looks like:


When an email is sent to the communities enabled user for forgot password or reset password, the link that salesforce sends in the {!Community_URL} works just fine, the user is taken to a set password (ChangePassword) page so that they can enter their new password without having to type the old password (since it's been reset).


The problem is when the welcome email gets sent out, the link in the email looks fine, however, when the user clicks on that link, the system logs them in the portal and redirects them back to /apex/TheCustomLoginPage (CustomLoginPage == Site Active Homepage).

Then by typing /home/home.jsp in the URL, I can see that the user is logged in. If I navigate to the change password page, it asks me for the old password, which I have never entered in the first place.


I've changed the communities landing and login page back to the original ones, now the welcome email link takes me straight in to the community /home/home.jsp. Again, I'm logged in and not redirected to setup the initial password.


I have identified 2 workarounds for the time being:

  • Disable the welcome email and use the reset password email as a welcome email too.

  • Build a custom change password page and forward the users to that page if the "referrer" on the landing page contains "frontdoor.jsp"


1) Is this a problem due to having a custom landing page/controller?

2) Is there a better workaround?

3) Where/Why is the /apex/ appended to the redirect URL when this is related to Communities and not internal VF?

  • I have similar issue, for change Password, i have different page and same i mentioned in comm. setting. when welcome mail is sent to user, then it open the default "changePassword" page instead of override page ? from where i can fix this issue ?
    – Ankuli
    Feb 5, 2016 at 15:43

3 Answers 3


You can use {!$Network.NetworkUrlForUserEmails} into Visualforce email template to send password setup Url of community and can set this template into community to send Welcome email to portal user, You can also handle on the basis of profiles etc into VF email template.


Ensure the Active Site Home Page and Inactive Site Home page are set to Communities Landing. Active Site Settings

Enable ChatterAnswers and set the ChatterAnswers Pages for the Community to your custom VF Pages (if you have any) Community Chatter Answer settings


You should enable the option "Don't immediately expire links in forgot password emails" on the community profile. The custom login acts as an intermediate page and the link expires as soon as clicked if you don't enable the option.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .