Loading
Salesforce now sends email only from verified domains. Read More
Experience Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Best Practices and Tips for Using SEO in Experience Builder Sites

          Best Practices and Tips for Using SEO in Experience Builder Sites

          Follow these guidelines and best practices when optimizing SEO in your site.

          Required Editions

          Available in: Salesforce Classic (not available in all orgs) and Lightning Experience
          Available in: Enterprise, Performance, and Unlimited Editions
          Applies to: LWR and Aura sites

          General SEO Best Practices

          • Locate a site 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.

          • To ensure that your Knowledge articles are included in search results, assign at least one navigational, featured, or content topic to each article.
          • If your org supports multilingual Knowledge articles, keep the same URL as the base language article. We don’t recommend replacing the URLs of translated articles with language-specific URLs.
          • To improve search results and help people decide whether it’s the page they want, use a page’s Title and Description properties.
            Note
            Note You can use other head markup global tags to configure your social media tags from OpenGraph to Twitter. We restrict the tags, attributes, and values allowed in the head markup of your pages to improve security.
          • To make the object page URL more readable for humans, change the page’s base URL. Update all other references to your pages, such as object, detail, list, or related list, that you hand-coded from other pages or from links outside your site. These references aren’t automatically updated.
          • Pages with non-standard URLs, such as URLs that include query string parameters, aren’t included in the sitemap or content snapshots. As a result, search engines can’t crawl or index these pages. Therefore, avoid using standard pages to deliver dynamic data via URL parameters (/s/product?productId=12345). Instead, use object pages for the record pages to be crawled (s/product/12345).
          • When creating a custom Aura component that generates a URL or navigates to a page, use lightning:navigation to generate proper <a href> links. Similarly, for custom Lightning web components, use lightning-navigation.
          • 301 redirects ensure that users and search engines are directed to the correct page. For example, for a URL such as www.my_site.com, we recommend creating a redirect to my_site.com. You can set up these redirects with your DNS provider.
          • To indicate that a page is a duplicate of another page, add a <link> element, with the attribute rel=canonical and point to the canonical page. For example, <link rel="canonical" href="https://example.com/home"/>. This action ensures that search engines crawl the canonical page and not a duplicate page.

          Sitemap and robots.txt Files

          • Don’t create a custom sitemap for LWR or Aura sites. Custom sitemaps are difficult to maintain and scale. Instead, use the automatically generated sitemap.xml file.
          • If you create a custom robots.txt file, it must include the paths to all sitemaps for the domain.
          • When URL slugs are enabled and configured for product and category pages, they’re used as the canonical URL in sitemaps created for LWR Commerce stores. Otherwise, the sitemap continues using the recordId URL.
          • If you enable guest user access for an object that has existing records, manually trigger the full sitemap generation. Otherwise, the sitemap doesn’t include the object’s records until the next automatic sitemap regeneration, which can be up to a week later.

          Data Security

          • Regularly review and update the objects and records that are public through your guest user profile. This best practice controls the scope of your sitemap and helps keep your site secure.
          • To ensure that object data is available to search engines, review the sharing rules, field-level security (FLS), and permission sets assigned to an object. Even though an object and its fields are public, Salesforce security settings still determine guest user access to this data.
          • Ensure that all sensitive objects are private, even objects used in private pages that aren’t included in the sitemap. All public pages and public objects are discoverable because search engines use the sitemap only as a starting point to identify which site content is available for crawling.

          Testing and Validation

          • Review the accuracy of your sitemap.xml file before submitting it to search engines. Navigate as an unauthenticated user to https://<site_URL>/s/sitemap.xml for Aura sites or https://<site_URL>/sitemap.xml for LWR sites. We suggest using Google Chrome’s incognito mode. Ensure that the URLs listed in the site map are appropriate for guest users.
            Note
            Note If a URL is mistakenly included in the sitemap, check that the correct permissions are enabled on the guest user profile and that your site is set up correctly for SEO.
          • Many webmaster tools require verification of your site. One of the best ways to verify that your site is to add the meta tag provided by the web team tool to your head markup.
          • Salesforce is a single-page application (SPA). So if you plan to use any third-party SEO tools to test your community, make sure that they’re configured to crawl JavaScript-based sites properly.
          • Check SEO performance and site speed using the free Salesforce Community Page Optimizer plug-in for Chrome.
           
          Loading
          Salesforce Help | Article