---
schema_version: "1"
id: c8adfbd613f27c8566d649050987e40df11fc22c7fd4ed7016989a0ec8b7daf6
title: Best Practices and Tips for Using SEO in Experience Builder Sites
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/experience/264-0-0/networks_seo_best_practices.md
canonical_url: https://help.salesforce.com/s/articleView?id=experience.networks_seo_best_practices.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d2fdda468e8761df0d94ac3e3153a7ac42cb0f6437d5ba4246362ecd4399c218
description: Follow these guidelines and best practices when optimizing SEO in your site.
products:
  - Experiences
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic (<a href="https://help.salesforce.com/s/articleView?id=xcloud.overview_edition_lex_only.htm&amp;type=5&amp;language=en_US" target="_blank">not available in all orgs</a>) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Applies to: <a href="https://help.salesforce.com/s/articleView?id=experience.exp_cloud_basics_glossary.htm&amp;release=264.0.0&amp;type=5">LWR and Aura sites</a></td></tr></tbody></table>

## 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](https://help.salesforce.com/s/articleView?id=experience.networks_seo_tags.htm&release=264.0.0&type=5 "Set the title, description, and head properties for your Experience Builder site pages to improve search results.").
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-experience-communities-264-0-0-production-enus/bf7df212-91a1-4fa3-a007-4d6f3e3b470b/images/icon_note.png)
    
    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](https://help.salesforce.com/s/articleView?id=experience.networks_seo_tags.htm&release=264.0.0&type=5 "Set the title, description, and head properties for your Experience Builder site pages to improve search results."), 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](https://help.salesforce.com/s/articleView?id=experience.networks_seo_configure.htm&release=264.0.0&type=5 "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."), 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-experience-communities-264-0-0-production-enus/bf7df212-91a1-4fa3-a007-4d6f3e3b470b/images/icon_note.png)
    
    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](https://chrome.google.com/webstore/detail/salesforce-community-page/alkcnclapbnefkodhbkpifdkceldogka) for Chrome.

#### See Also

- [_Blog Post:_ Advanced SEO for Lightning Communities](https://developer.salesforce.com/blogs/2018/01/advanced-seo-lightning-communities.html)
- [SEO for Experience Builder Sites](https://help.salesforce.com/s/articleView?id=experience.networks_seo.htm&release=264.0.0&type=5 "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.")
- [SEO Best Practices and Considerations for Guest Users](https://help.salesforce.com/s/articleView?id=platform.networks_SEO_best_practices_guest_users.htm&type=5&language=en_US)
- [SEO for Experience Builder Sites FAQ](https://help.salesforce.com/s/articleView?id=experience.networks_seo_faq.htm&release=264.0.0&type=5 "Answers to common questions about using SEO in your Experience Builder site.")