You are here:
Set Up Your Salesforce Site
The first step on the website integration adventure is to set up your Salesforce Site. It's a quick process. Ready? Let's jump in!
- Enable Salesforce Sites with a Domain Name
Enable Sites by claiming a domain name for your organization's Sites presence. - Create a Site to Host Volunteers for Salesforce Pages
The next step in setting up your website is to create the site that will host the Volunteers for Salesforce pages. - Create a Custom robots.txt File
The robots.txt file uses include and exclude rules to inform web spiders and robots about which areas of your site to index. You can create a Visualforce page to host the information. Search engines will use the file to index your site pages.
Enable Salesforce Sites with a Domain Name
Enable Sites by claiming a domain name for your organization's Sites presence.
If your organization already has a Sites domain, you can use it instead of creating one specifically for hosting V4S on your website. The Sites domain is a custom domain that's separate from any subdomain that your org may have registered using the My Domain feature in Salesforce. The domain name that you choose for the Sites domain can be the same as the one you use for My Domain, since they're not related.
- From Setup, enter Sites in the Quick Find box, then select Sites.
- Enter a domain name, which is typically your organization's
name or a variation of it. Then click Check Availability.
Important After you register the domain in the next step, you can't change it. That's not a big deal if you're just using Sites for Volunteers for Salesforce pages that you're hosting on your organization's own website (since website visitors don't see this domain name).But in the future you may decide to expose Sites pages directly, so choose something reasonable. - Acknowledge that you have read and accepted the Sites Terms of Use, then click Register My Domain.
- Click OK to confirm registration.
Create a Site to Host Volunteers for Salesforce Pages
The next step in setting up your website is to create the site that will host the Volunteers for Salesforce pages.
- On the Sites page, click New.

- Enter the required information.
- Site Label—Enter a descriptive label, in case you love using Sites so much that you decide to create other Sites in the future.
- Site Name—Review the unique name that's automatically filled in for you.
- Site Contact—Choose yourself or another system administrator.
- Default Web Address—The URL suffix is optional. Enter it only if you want your Sites URL to point to a directory more specific than the default Salesforce URL. If you do enter a value here, include it later whenever you specify URLs to your Sites pages.
- Active—Select this option to make your site accessible for testing right away.
- Active Site Home Page—For now, set the home page to use the default Under Construction Visualforce page. Click the Search icon, then select the UnderConstruction Visualforce page.
- Clickjack Protection Level—Set to Allow framing by the same origin only (Recommended). To allow Sites to be IFRAMEd into your website, consider a less secure level. See Enable Clickjack Protection in Site.com.
-
Lightning Features for Guest Users—This feature isn't needed for V4S pages. Disable Lightning Features for Guest Users to enhance security and prevent unnecessary access to your org.
- Save your changes.
Create a Custom robots.txt File
The robots.txt file uses include and exclude rules to inform web spiders and robots about which areas of your site to index. You can create a Visualforce page to host the information. Search engines will use the file to index your site pages.
Create a Visualforce Page
-
From Setup, enter Visualforce Pages in the Quick Find box, then select Visualforce Pages.
-
Click New.
- Enter Robot.txt in the Label field.Note The Name field will automatically generate based on the Label field. Feel free to edit.
-
Delete the placeholder Visualforce Markup.
-
Paste your robot.txt.
-
Save your changes.
Sample Robot.txt
If your org doesn't have its own, you can use this sample robot.txt:
<apex:page contentType="text/plain" showHeader="false">
Allow: /GW__Volunteers__PersonalSiteJobListing?*
Disallow: /
</apex:page>Here's what the different lines of code mean:
Allow:
/GW__Volunteers__PersonalSiteJobListing?* = Allows the Job listing page
with your parameters to be open to bots.
Disallow: / = Hides everything from
all bots.
For more on what robots.txt is and an example of how to create one, visit the Salesforce Help docs.

