You are here:
SEO for Experience Builder Sites
Search engine optimization (SEO) ensures that your public Experience Builder site is visible to search engines. SEO helps customers, partners, and visitors find your content via online search.
Required Editions
| Available in: Salesforce Classic and Lightning Experience |
| Available in: Enterprise, Performance, and Unlimited Editions |
| Applies to: LWR and Aura sites |
Before you begin setting up SEO for your Experience Builder site, it helps to familiarize yourself with these concepts.
Publicly Available Sites
SEO is supported on production orgs for Experience Builder sites that are public or that have some public pages. SEO isn’t supported on Developer Edition, sandbox, or trial orgs.
After you make your site public, search engines can index the public pages of your site. Additionally, the SEO settings tab in Experience Builder becomes available, where you can view the number of indexed records, manually generate the sitemap, and refresh content snapshots.
Location of Your Experience Builder Site
For search engines, such as Google™ or Bing®, your site must be at the root level. To determine the location of your site, from Setup, in the Quick Find box, enter Digital Experiences, and then click All Sites. Then, check the address in the URL column.
The address for a root-level site has the format https://site_URL. A site that isn’t at the root level commonly has a URL with a path prefix in the format https://site_URL/sub_path/.
If your site has a URL prefix, meaning it’s not at the root level, you must create a root site. You submit the sitemap for the root-level site to search engines first, and then submit the URLs for the site with a path prefix.
The robots.txt File
The industry standard robots.txt file informs search engine spiders and bots which areas of your site you want them to access. The robots.txt file for your site is automatically generated and allows search engines to crawl your entire site. The robots.txt file is at the root level of your site and is unique for each domain. Therefore, sites that share a domain also share a robots.txt file. Conversely, sites available on multiple domains, meaning *.force.com, *.my.site.com, and custom domains, have different default robots.txt files.
To view the robots.txt file, navigate to https://<community_URL>/robots.txt. The robots.txt file uses include (Allow) and exclude (Disallow) directives to inform spiders and bots about which areas of your site to crawl. Only relative URLs are valid for the Allow and Disallow directives.
The Sitemap
The sitemap.xml file for your site contains a list of the public pages and the objects and fields with read access in the guest user profile. Search engines use the sitemap as a starting point to discover which information from your site is available for crawling and important content to index. The sitemap is at the root level of your site. To view the sitemap.xml file, navigate to https://<site_URL>/s/sitemap.xml for Aura sites or https://<site_URL>/sitemap.xml for LWR sites.
To ensure that your Knowledge articles are included in the sitemap, assign at least one navigational, featured, or content topic to each article. If your org supports multilingual Knowledge articles, the sitemap includes an entry for each supported language, based on Google’s recommended format.
The sitemap is automatically generated one time a week. It’s generated the first time on the following Sunday, and then regenerated every Sunday thereafter. Additionally, an automatic partial sitemap refresh occurs every 24 hours. The sitemap.xml file is available only in production orgs.
If your org deactivates the account of the user who most recently published a site, the sitemap is no longer refreshed automatically. To resume automatic sitemap refreshes, reassign the scheduled jobs that generate an automatic sitemap refresh to an active or automated user.
For best performance, if you generate a manual sitemap, do so during off-peak hours.
Page Indexing
When you make your site public, search engines can then index all the pages of your site. However, if you don’t want search engines to index certain pages, you can:
- Make a page private. Use this method to make the page unavailable to both guest users and search engines.
- Use the noindex meta tag. This tag prevents search engines from showing the page in search results, but allows guest users to view the page.
- Create a custom robots.txt file. The robots.txt file is a rules-based approach to control search engine crawler access to specific areas of your site. Guest users can still view pages that you don’t want search engines to crawl.
By default, objects displayed on a page are private and can’t be indexed until you explicitly make an object and its associated fields available to search engines.
If you plan to use a custom domain, keep your site private until you add and configure the custom domain. This way, search engines don’t index your site’s pages with the Salesforce-managed domain URLs.
After a search engine indexes a site page, you can’t remove the public page from search results through Experience Builder. To remove a site page from an existing index, either make the page private or use the search engine’s tools. For example, see Remove Web Results from Google Search in Google Search Help.
- Set Up Your Experience Builder Site for SEO
Setting up SEO for your Experience Builder site includes a series of tasks that you perform in Salesforce and in the site. From identifying your preferred domain to determining which objects to make public, we’ve got you covered. - Identify Your Preferred Domain to Improve SEO Results
By default, your site is available on the *.my.site.com or *.force.com domain, but you can add a custom domain so that your site URLs reflect your company brand. However, multiple domains for the same site, meaning *.my.site.com, *.force.com, and custom domains, can dilute search engine results and lower page ranking. If you have multiple domains, identify which domain to use for crawling and indexing your site’s pages. - SEO Page Properties in Experience Builder
Set the title, description, and head properties for your Experience Builder site pages to improve search results. - Create a Custom robots.txt File for Your Experience Builder Site
The robots.txt file for your site is automatically generated. It allows search engines to crawl your entire site. However, if you want to tell search engines not to crawl certain pages of your public site, you can create a custom robots.txt file. - Use SEO-Friendly URLs in Your Enhanced LWR Site
Boost organic traffic to your site by improving search engine optimization (SEO) with new URL configuration solutions. SEO-friendly URL snippets, or slugs, improve SEO by replacing the record ID in the URL with relevant and human-readable information, ensuring that your site’s pages are optimally surfaced in search engines. - Make Objects Available for SEO
When you make your site public, search engines can index the pages of your Experience Builder site. However, to ensure that you don't expose sensitive data, the data displayed by objects on those pages aren’t public. Instead, you must specifically make those objects and their associated fields publicly available for indexing by search engines. - Provide Search Engines with Fresh Content Snapshots
Experience Builder sites in your production org use the Content Snapshot service to generate SEO optimized HTML for web crawlers such as Googlebot, and content sharing platforms such as Facebook. The concept is common to single-page application frameworks known as dynamic rendering. Salesforce takes a snapshot when you make changes to your site’s publicly available content. This functionality works well for most updates. But let’s say you update a page with time-sensitive information, such as price changes for a flash sale. Instead of waiting, you can take a manual snapshot once every 24 hours to refresh the page content served to search engines. - Generate a Manual Sitemap Refresh for Your Experience Builder Site
When you go live with a new Experience Builder site or make significant updates to an existing one, you can generate a manual sitemap one time every 24 hours outside of the weekly automatic sitemap refresh. - Enable GEO to Make Site Pages More Discoverable by AI
To make public site pages more discoverable by AI-powered search engines and enhance the precision of generated answers, enable generative engine optimization (GEO) in Experience Builder. When you enable GEO, AI bots can request content snapshots of your site’s pages to generate answers more effectively. - Reassign the Scheduled Jobs that Generate an Automatic Sitemap Refresh
To generate an automatic sitemap refresh, Salesforce uses an automated process called scheduled jobs. An automatic sitemap refresh requires two scheduled jobs that are associated with the account of the user who most recently published that site. If that user’s account is deactivated, the scheduled jobs can’t run, and your sitemap no longer refreshes automatically. To resume automatic sitemap refreshes, reassign the scheduled jobs that refresh the sitemap to an active or automated user account. - Best Practices and Tips for Using SEO in Experience Builder Sites
Follow these guidelines and best practices when optimizing SEO in your site. - SEO for Experience Builder Sites FAQ
Answers to common questions about using SEO in your Experience Builder site.
See Also
- Blog Post: Experience Cloud Content Snapshots and SEO Best Practices
- SEO Best Practices and Considerations for Guest Users
- Blog Post: Advanced SEO for Lightning Communities
- Federated Search in Experience Cloud Sites
- Enable Salesforce Knowledge in Your Experience Cloud Site
- Salesforce Security Guide: Field Permissions
- LWR Sites for Experience Cloud: Create a Multilingual Site

