Follow these guidelines and best practices when using SEO in your community.
|Available in: Salesforce Classic|
|Available in: Enterprise, Performance, and Unlimited Editions|
- Don’t create a custom site map; use the auto-generated sitemap.xml file.
- If you create a custom robots.txt file, ensure that it points to the auto-generated site map—for example, http://<community_URL>/s/sitemap.xml.
- If your org supports multilingual Knowledge articles, we recommend against replacing the URL of translated articles with language-specific URLs. Instead, retain the same URL as the base language article.
If your community supports multiple languages, the site map automatically includes an entry for each supported language as follows:
<xhtml:link rel="alternate" hreflang="language_code" href="https://org62.my.salesforce.com/help/doc/en_US/page_URL?language=language_code" />
- In Page Manager, ensure that each page’s Title and Description fields have meaningful entries, where applicable. The page title is used in the browser tab or window, search engine results, and bookmarks. Content in the Description field is shown in search engine results to help people quickly decide whether it’s the page they want.
- Before submitting the sitemap.xml file to search engines for crawling, navigate to https://<community_URL>/s/sitemap.xml as an unauthenticated user. (We suggest using Google Chrome’s incognito mode.) Ensure that the URLs listed in the site map are appropriate for guest users.
If a URL is mistakenly included in the list available to guest users, ensure that the correct permissions are enabled on the guest user profile and that your org is set up correctly. For example, to prevent Case Detail URLs from being included in the site map, from Setup, enter Sharing Settings in the Quick Find box. Then, click Edit and set the Default Internal Access for Case to Private.
- Redirecting HTTP requests to HTTPS is an SEO best practice. Therefore, we recommend against disabling the Require Secure Connections (HTTPS) setting on the Site Details. To verify that the checkbox is selected, in Community Management, click .
- 301 redirects are a great way to ensure that users and search engines are directed to the correct page. For example, for a URL such as www.my_community.com, we recommend creating a redirect to my_community.com. You can set up these redirects with your DNS provider.