Manage Salesforce Sites Login and Registration Settings
Let users register for and log in to your portal from your public Salesforce Site. For example, users browsing through an ideas site can register and login directly from that site. Then, as authenticated users, those users can vote, add comments, and participate in the ideas community. When users successfully log in, they leave the public site and enter the associated portal seamlessly.
Required Editions
| Available in: both Salesforce Classic and Lightning Experience |
| Available in: Developer, Enterprise, Performance, and Unlimited Editions |
| User Permissions Needed | |
|---|---|
| To create and edit Salesforce Sites: | Customize Application OR Create and Set Up Experiences |
The Authenticated Website high-volume portal user license is specifically designed to be used with Salesforce sites. Because it's designed for high volumes, it should be a cost-effective option to use with Salesforce sites.
Salesforce Sites provides built-in registration and login logic. Default Lightning Platform-branded Visualforce pages are associated with registration, login, forgot password, and password changes. You can modify these pages or replace them with your own.
The following login and registration pages are provided by default:
| Page Name | Description |
|---|---|
| SiteLogin | Default login page. Used to log users in to the associated portal from your Salesforce Site. |
| SiteRegister | Default registration page. Used to register new users for the associated Customer Portal from your Salesforce Site. |
| SiteRegisterConfirm | Default registration confirmation page. The page that users see on successful registration to the associated Customer Portal. |
The built-in login process:
- Checks to see whether the site is enabled for logins
- Checks to see whether the user is a valid user for the site
- Allows users to reset expired passwords
The built-in registration process:
- Checks new user information against existing users for the Customer Portal associated with the site
- Checks to see if a contact already exists for the new user
- If a contact doesn’t already exist, create one and associate it with the account
for the site.
Important When you associate a contact with a the account for the site, you must update the SiteRegisterController with the Account ID. - Enables the Customer Portal for the new user and sends an email confirmation message
- Optionally, allows users to create passwords on the registration page, avoiding the standard email confirmation process
createPersonAccountPortalUser Apex method. To
create a person account using either the default record type defined on the guest
user's profile or a specified record type, use createPersonAccountPortalUser, then enable the
person account for the site's portal. Person Accounts can only be enabled as
high-volume portal users.-
After you associate a contact with your site for the built-in registration
process, update the SiteRegisterController with the Account ID.
- From Setup, in the Quick Find box, enter Apex Classes, and then select Apex Classes.
- Click Edit next to SiteRegisterController.
-
Find the
private static Id PORTAL_ACCOUNT_ID = '<Account_ID>';line and insert the ID for the account that you want to associate with new users.The line should look similar to this:private static Id PORTAL_ACCOUNT_ID = '001DoooooolQpyk'; - Save your changes.
-
Enable public login and registration for your portal.
- From Setup, in the Quick Find box, enter Sites, and then select Sites.
- Click the name of the site.
- Click Login Settings.
- Click Edit.
-
From the Enable Login For list, select a portal to associate with your
site. The portal you choose must have the Login Enabled option selected.
For Customer Portals, you must also select the Self-Registration Enabled
option. Salesforce Sites leverages the following portal settings:
- Logout URL is used if you want to take users to a specific page on logout. If this value is left blank, users are taken to the page specified in the Active Site Home Page field for your site.
- Lost Password Template is used for the forgot password process.
- Header, Footer, Logo, and Login Message are used for the look and feel on IdeasHome and AnswersHome pages.
- For Customer Portals:
- New User Template is used on self-registration if a password is not provided.
- Default New User License, Default New User Role, and Default New User Profile are used for self-registration.
-
Select a Change Password Page.
A default page is provided, but you can select your own page instead, using the lookup field.
-
To let authenticated users access standard Salesforce pages as allowed
by their access controls, select Allow Access to Standard
Salesforce Pages.
This setting is enabled by default. If this setting is disabled, authenticated users can’t access standard Salesforce pages, even if their access controls allow it.
- The Secure Web Address field shows the unique Salesforce Sites URL for this site when using SSL.
- Save your work.
You can also enable Sites to use your identity provider for single sign-on.

