What is Salesforce Sites
Salesforce Sites gives us to the ability to build public websites and applications directly integrated with our Salesforce organization without even requiring users to log in with a credentials like username and password.
We can expose to Public any Page or information stored in our organization and make the site’s pages match the look and feel of our company’s brand.
We can host any Visualforce Page on sites and make Guest user access that page without requiring any login thereby eliminating any need for License.
How to Setup Sites
To set up a Salesforce Site:
- From Setup, enter Sites in the Quick Find box and Click Sites. User would be landed to below screen.
- Register for a Sites domain for your organization by entering Desired Name and Click on ‘Check Availability’. If entered domain is available for use than click ‘Register My Sales force Site Domain’
- After Successful Registration of Domain , User will be shown a success Message as below
- After registering your Salesforce Sites domain, create a Salesforce Site by Clicking New
- User would be redirected to New Site Page . Enter all Mandatory details as per below Description and Click Save:-
- User will be redirected to Site Detail Page.
|Site Label & Name||The name of the site as it should appear in the user interface|
|Site Contact||Point of Contact for Site Related Communication|
|Default Web Address||First Part of Address is entered and user has to add a unique site name to the end.|
|Active Site Home Page||Landing page where users will be directed to when this site is active. Click lookup field and select the Visualforce page that has been developed for site’s home page.|
|Default Record Owner||Select User who would be default owner of records created by guest users from Site|
Assigning Different Error Pages for SALESFORCE SITE
Salesforce sites uses Visualforce pages for different error pages. Assign different error Pages from ‘Error pages’ related list on Site Detail Page as per below details:-
- Authorization Required Page—the page users see when trying to access pages for which they do not have authorization.
- Limit Exceeded Page—the page users see when your site has exceeded its bandwidth limits.
- Maintenance Page—the page users see when your site is down for maintenance. •
- Page Not Found Page—the page users see when trying to access a page that cannot be found.
- Generic Error Page—the page users see when encountering generic exceptions.
Preview a Site
- From Setup, enter Sites in the Quick Find box, and then select Sites.
- Click on the ‘Site Label’ for site you want to preview.
- In the Site Detail section, Under ‘Custom URL’ list , click the ‘Preview as Admin’ link.
- New Browser Window would be opened and show preview of Site.
PUBLIC ACCESS SETTINGS FOR SALESFORCE SITES
- On Site Detail Page , Click on ‘Public Access Settings’
- Page which includes all profile permissions and settings for Guest User opens.
- In the site profile, we can control below settings :-
- Object permissions for site: To Control which all objects our guest user will be able to access via site.
- Visibility of custom apps. To Control which all apps our guest user will be able to access via site.
- Login hours: To specify during which hours users can access the site.
- IP Ranges : To Restrict the IP address ranges from which User can access the site
- Enable Apex controllers and methods for your site.
- Enable Visualforce pages for your site.
- Different General and Administrative Permissions regarding Guest User.