How to override the HTTPS constraint on the Salesforce Communities Recommendations.
Salesforce Communities

Salesforce Communities allow to easily interact with key stakeholders, namely customers and partners, for purposes such as customer or partner support and can be set by using Salesforce default properties or by using predefined templates.

Some of the features allowed by communities are:
- custom configuration based on stakeholder’s needs;
- engaging stakeholder service and support;
- provide an environment where stakeholders can interact with each other and this way promote sales;
- increase employer performance.
Salesforce Community Recommendations
One of the elements, available as a Lightning Component through the Community Builder, which may be used within Salesforce Communities is Recommendations. As its name suggests, it allows to make recommendations for the stakeholders.

Salesforce Community Recommendations Customization
The customization of the Salesforce Community Recommendations is done through the Community Management or the Community Workspaces, and has the following specific fields:
- Name – the recommendation’s name;
- Image – the image that will be shown in the recommendation;
- Title – the recommendation’s header;
- Description – the recommendation’s description;
- Button text – the recommendation’s button label;
- https:// – the URL (Uniform Resource Locator) associated to the button on the recommendation.

HTTPS
HTTPS (Hyper Text Transfer Protocol Secure) is a communication protocol that was created to provide secure network communications, assuring the authentication, integrity and privacy of the involved data, being its use mandatory in the customization of Salesforce Community Recommendations.

URL Shortener
A URL shortener is a tool that allows reducing the size of a URL. For instance, the fictitious URL "www.urlshortenertest.com" can be easily shortened to "goo.gl/c7hfYO" by using a URL shortening service such as Google URL Shortener.

As can be seen in the previous example, this allows hiding an HTTP URL in a HTTPS URL, and therefore it’s possible to show HTTP URL webpages on Salesforce Community Recommendations, bypassing the default limitations of the Lightning Component and increasing the scope of webpages that can be recommended.
Notes:
- Make sure the webpage to which the URL is being shortened into is in fact secure from a general point of view, considering that the URL field of the Community Recommendations was set by default to only accept HTTPS webpages for a good reason;
- It is a best practice to keep record of the original URL when using a URL Shortener because if the location of the original webpage changes, it may become difficult to retrieve, considering only the shortened URL.
Author