function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

cutomizing customer portal login page forgot password link

We have sites implemented, but the Customer Portal URL can still be accessed, and the Customer Portal Login screen is displayed.

1.) how can we disable the Old URL?

2.) If we cannot disable the old URL, how can I disable or customize the forgot password link? We have our own Forgot Password functionality in place but if the user access the Old URL and click on this link, SalesForce sends the password to the user bypassing our Forgot Password mechanism.


I've tried to insert a javascript in Login Message in Customer Portal Settings and tried to change the href value of the forgotPassword link. but the element is not yet loaded onload and I can't change the href attribute. Any other ideas?

I'm pretty sure I answered this question on another post: make yourself a Sites login page.  Then you can make your forgot password anything you want (or omit it entirely).

Yes, there's a similar post like this one and I posted my question there too.


We've already implemented a Sites page for our login mechanism. but the problem is that the old URL, the ones that our clients are using before we implemented Sites, can be accessed and displayed in a browser.



- we created a Customer Portal named CustPortalA: SalesForce generates a URL for this specific customer portal.

let's say the URL is

- the clients are using this URL for a while

- we implemented a Sites named SitesA that will serves as our custom Login page: SalesForce generated a URL for the sites based on the domain name we specified.

let's say the URL for Sites is

- we created a new Customer Portal named CustPortalB: SalesForce generates a URL for this specific customer portal.

let's say the URL is

- The sites page will login internally using the new Customer Portal CustPortalB.

- we informed the clients to use to login instead of using the old

- we disabled the Login capabilities in Customer Portal CustPortalA to prevent the user from logging in the previous URL (

- some clients saved or bookmarked the old URL ( The old login screen will be displayed but it will not allow them to login. but it will allow them to access the forgot password link and gain access to SalesForce Standard Forgot Password facility.

Hmm, I don't think there's much you can do about that beyond what you've already done then.

Thank you for the reply.

I've asked a colleague and told me he already done that before, and that it is possible to override the forgot password link using the customer portal header or footer. I've tried it recently but I wasn't successful. Maybe it is not possible now in the later versions. Anyway, I will dig deeper and see if I can make it work this time.



do you have a link to that thread (make yourself a sites login page)?