Salesforce Lightning Communities (LCC) is a social enterprise software that helps companies of all sizes build relationships, share information and ideas. With LCC you can create a destination for the people who matter most to your business, such as customers, partners and employees.
Lightning Communities are single-page applications, SPAs, which is the same framework used by a number of websites where the content changes based on user interaction, but the URL doesn’t – e.g. online mailboxes and social networking websites.
However, Salesforce’s documentation around best practices for Lightning Communities can be… Confusing.
In a 2018 article, co-authored by David Green, the VP of Product Management at Salesforce, they recommend using the
force:navigateToURL function in order to generate properly formed <a href> links in your custom Lightning components.
But as detailed in the LIghtning Aura Components development guide:
standard__webPagetype replaces the
This is also echoed in the general developer component library reference guide, where it outlines that lightning:navigate should be used in conjunction with the
standard_webPage type in Lightning Communities, Lightning Experience, and the Salesforce App.
So which one should we use? And does it matter for SEO?
Depending on the environment in which you’re working in, this answer can vary.
You need to work with your integrator on a viable, working solution for both users and search engines.