To create a public site in Salesforce, you can follow these steps:
- Enable Public Access Settings: First, ensure that your Salesforce org has public access settings enabled. To do this, go to “Setup” in Salesforce, search for “Public Access Settings” in the Quick Find box, and select “Public Access Settings.” Enable the necessary permissions for public access, such as read and create access for objects, fields, and other components that you want to expose on the public site.
- Create a Force.com Site: Go to “Setup,” search for “Sites” in the Quick Find box, and select “Sites and Domains.” Click on “New” to create a new Force.com site. Provide a unique name for the site, specify the site’s URL, and configure other settings like active status and the default home page.
- Define Site Visualforce Pages: After creating the site, you need to define Visualforce pages that will be accessible to the public. To create a Visualforce page, go to “Setup,” search for “Visualforce Pages” in the Quick Find box, and select “Visualforce Pages.” Click on “New” to create a new Visualforce page. In the page code, you can define the content and functionality you want to expose to the public.
- Set Up Site Security: Determine the access and authentication requirements for your site visitors. In the site settings, you can configure different security options, such as guest user access, user registration, and login settings. You can also configure page-level security using Visualforce access settings.
- Customize Site Navigation: If you want to create a navigational structure for your public site, you can use custom Visualforce tabs or links to provide easy navigation. You can create custom tabs using the “Tabs” setup menu option and associate them with Visualforce pages.
- Configure Site Branding: Customize the branding of your public site to match your organization’s look and feel. You can upload a logo, specify color schemes, and define custom CSS styles to control the appearance of the site.
- Publish the Site: Once you have configured the necessary settings, click on the “Publish” button to make your site accessible to the public. The site URL you defined during site creation will be used to access the public site.
Remember to thoroughly test your public site to ensure that it functions as expected and that the appropriate security measures are in place.