Newer Version Available

This content describes an older version of this product. View Latest

Create and Edit Salesforce Sites

Available in: Salesforce Classic (not available in all orgs)
Available in: Developer, Enterprise, Performance, and Unlimited Editions

User Permissions Needed
To create and edit Salesforce Sites: Customize Application
After registering your Salesforce Sites domain, create a Salesforce Site.
  1. From Setup, enter Sites in the Quick Find box, and select Sites.
  2. Click New, or click Edit to modify an existing site.
  3. On the Site Edit page, configure the following settings.
    Field Description
    Site Label The name of the site as it appears in the user interface.
    Site Name The name used when referencing the site in the SOAP API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
    Site Description An optional description of the site.
    Site Contact The user who receives site-related communications from the site’s visitors and Salesforce.
    Default Web Address The unique Salesforce Site URL for this site. Salesforce Sites provide the first part of the URL based on the domain name that you registered. You must add a unique site name to the end. Unless you configure a custom address through a domain name registrar, this URL is the one that the public uses to access your site.
    Active Select when you’re ready to make your site available to the public. You can also activate your site from the Sites and Site Details pages. When the site is inactive, users see the page specified in the Inactive Site Home Page field.
    Active Site Home Page The landing page that users are directed to when this site is active. Use the lookup field to find and select the Visualforce page that you developed for your site’s home page. Choose the UnderConstruction page if you want to test your site.

    For ideas sites, you must use the IdeasHome page. For answers sites, use the AnswersHome page. If you don’t use a site template, your site inherits its look and feel from its associated portal.

    If you deployed a site before the Summer ’10 release, you can set AnswersHome as your default landing page if you create a Visualforce page using <apex:page action="{!URLFOR('/answers/answersHome.apexp')}"/>.

    Inactive Site Home Page The landing page that users are directed to when this site is inactive. Use the lookup field to find the page that you want to use. You can, for example, select a page to indicate that the site is under construction or down for maintenance.
    Site Template The template that provides the page layout and style sheet for your site. The site template overrides the formatting inherited from the associated portal. Use the lookup field to find a template that you’ve developed, or use the provided template.

    The site template specified here is used only for Visualforce pages using the $Site.Template expression.

    Note

    Site Robots.txt A file that determines which parts of your public site that web spiders and other web robots can access. Search engines often use web robots to categorize and archive websites. HTML tags are not allowed because they are not compatible with robots.txt spiders. For Visualforce pages, add contentType="text/plain" to the <apex:page> tag.
    This example disallows all robots from indexing all pages.
    1<apex:page contentType="text/plain">
    2    User-agent: *  # Applies to all robots
    3    Disallow: /    # Disallow indexing of all pages
    4    </apex:page>
    This example allows all robots to index all pages.
    1<apex:page contentType="text/plain">
    2            User-agent: *  # Applies to all robots
    3            Disallow:      # Allow indexing of all pages
    4            </apex:page>
    Site Favorite Icon The icon that appears in the browser’s address field when visiting the site. Use this field to set the favorite icon for your entire site instead of for each page. Due to caching, changes are reflected on your site one day after you make them.
    Analytics Tracking Code The tracking code associated with your site. This code can be used by services like Google Analytics to track page request data for your site.
    URL Rewriter Class An Apex class to use for rewriting URLs for your site, from Salesforce URLs to user-friendly URLs. With this class, you can make rules to rewrite site URL requests typed into the address bar, launched from bookmarks, or linked from external websites. You can also create rules to rewrite the URLs for links within site pages.
    Enable Feeds The option that displays the Syndication Feeds related list, where you can create and manage syndication feeds for users on your public sites. This field is visible only if you have the feature enabled for your organization.
    Clickjack Protection Level
    You can set the clickjack protection for a site to one of these levels:
    • Allow framing by any page (no protection): The least secure level.
    • Allow framing of site or community pages on external domains (good protection): Allows framing of your site pages by pages on your external domains, but only if the domains are whitelisted.
    • Allow framing by the same origin only (recommended): The default level for sites. Allows framing of site pages by pages with the same domain name and protocol security.
    • Don’t allow framing by any page (most protection): The most secure level, but it can cause certain pages to appear as blank pages. To avoid this issue, use the default setting instead.

    If you select Allow framing of site or community pages on external domains (good protection), select Add Domain in the Whitelisted Domains for Inline Frames section, enter the domain you want to allow iframes on, and select Save.

    Require Secure Connections (HTTPS) When this option is enabled for a Salesforce site, a Site.com site, or any Communities site, requests that use HTTP are redirected to HTTPS.

    Before enabling this setting, select HSTS for Sites and Communities under Session Settings.

    Note

    Upgrade All Requests to HTTPS Determines whether HTTPS is required for connecting to third-party domains.
    Enable Content Sniffing Protection Prevents the browser from inferring the MIME type from the document content. It also prevents malicious files from being executed as dynamic content (JavaScript, style sheet).
    Enable Browser Cross-Site Scripting Protection Protects against reflected cross-site scripting attacks. When a reflected cross-site scripting attack is detected, the browser renders a blank page with no content.
    Referrer URL Protection When loading pages, the referrer header shows only Salesforce.com rather than the entire URL. This feature eliminates the potential for a referrer header to reveal sensitive information that could be present in a full URL, such as an org ID. This feature is supported only for Chrome and Firefox.
    Guest Access to the Support API When this option is enabled for a Salesforce site or Salesforce Communities Salesforce site, unauthenticated users are allowed to access the Support API.
  4. Click Save.

You define custom URLs from Domain Management in Setup.

Note