Skip to main content

How to Create a Salesforce (Force.com) Site

Register a Force.com Domain

  • In Salesforce, click the gear icon (⚙️) and select Setup.
  •  In the Quick Find, type Sites and select Sites.
  • If this is your first time, you will be prompted to register a Force.com domain.
    • Enter a unique domain name (e.g., mydomain) that will be used in your site URL.
    • Click Check Availability to see if the domain is available.
    • Click Register Domain to complete the registration.

Create the Site

  • On the Sites page, click New.
  • Fill in the required information:
    • Site Label: Friendly name of the site.

    • Site Name: Unique internal name for the site (used in API and URLs).

    • Site Contact: User responsible for the site.

    • Default Web Address: Sets the final site URL (https://mydomain.force.com/siteName).

    • Active: Check to activate the site after creation.

    • Active Site Home Page: s2me.Sign2meAccessDocumentPage

    • Inactive Site Home Page: s2me.InMaintenance

    • Site Template: s2me.SiteTemplate

    • Enable Feeds: Unchecked

    • Analytics Tracking Code / URL Rewriter Class: Sign2meUrlRewriter

    • Clickjack Protection Level: Allow framing by the same origin only (Recommended)

    • Lightning Features for Guest Users: Checked

    • Enable Content Sniffing Protection / Enable Browser Cross Site Scripting Protection / Referrer URL Protection: Checked

    • Allow only required cookies for this site: Unchecked

    • Guest Access to Payments API / Guest Access to Support API: Unchecked

    • Redirect to custom domain / Cache public Visualforce pages: Checked

Select the Visualforce pages to be included in the site

  • s2me.AuditTrailPage

  • s2me.BandwidthExceeded

  • s2me.Exception

  • s2me.FileNotFound

  • s2me.InMaintenance

  • s2me.PicklistTranslationService

  • s2me.Sign2meAccessDocumentPage

  • s2me.Sign2meAppPage

  • s2me.Sign2meCompletedPage

  • s2me.Sign2meExpiredPage

  • s2me.Sign2meLinkSentPage

  • s2me.Sign2meNotFoundPage

  • s2me.Sign2meValidatorPage

  • s2me.SiteTemplate

  • s2me.Unauthorized

Configure Error Pages

  • Define custom error pages for each condition:
    • Authorization Required Page (401): s2me.Unauthorized

    • Limit Exceeded Page (509): s2me.BandwidthExceeded

    • Maintenance Page (500/503): s2me.InMaintenance

    • Page Not Found Page (404): s2me.FileNotFound

    • Generic Error Page: s2me.Exception

Configure Permissions

  • Click Public Access Settings to define which objects, fields, and pages are accessible to the public.
    • This opens the Site Guest User profile.

    • Adjust object, field, and Visualforce Page permissions as needed.

Activate and Test

  • Make sure the site is active.

  • Click the Site URL link to test public access.

  • Verify that all pages and resources are working as expected.