function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lauren BLauren B 

Custom Favicon in salesforce community

Hi All,

I am working on a Salesforce Community . I wanted to have my custom favicon to the entire community. I have configured Edit Head Markup in the community builder with this:
<link rel="icon"  href="/sfsites/c/file-asset/logo_3v7a_final_favicon?v=1" type="image/png"/>

This is working fine, if and only if I logged into our community(Home Page). Strangely, this config is not working on login page. Am I missing anything in the tag?
Please let me know how can I make this favicon icon working on Login page with or without Logging-in.

Thanks.
 
AnudeepAnudeep (Salesforce Developers) 
Hi Lauren, 

The way I recommend doing this is:

upload the icon as a Static resource.

go communities -> workspaces -> administration -> pages -> go to Force.com

click edit, set the Static Resource as the Sites Favourite Icon((NOTE: there is NO REIDP_Favicon static resource in the org currently, please provide this, I have added one but not sure if it's right)
.

and then in the edit head markup of the communities I add:

<link rel="shortcut icon" href="<SITE>/favicon.ico?v=2" />

which would be:
<link rel="shortcut icon" href="https://csp1idsre-customer-portal-iata.cs88.force.com/identity/favicon.ico?v=2" />

this will work. because the "Sites Favourite Icon" gets added to the site at the root of /identity as favicon.ico. the ?v=2 is to ensure we get the most up-to-date one.

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Lauren BLauren B
Hi Anudeep,

I did all the steps you mentioned above but still favicon is not showing on the login page.  I would appreciate if you have any other solutuon or correct me if I am doing anything wrong in the previous steps. Thank you so much.
Lauren BLauren B
I am using custom domain in the production, but in sandbox with the force.com url its reflection on the login page(did the avove steps). Do i need to change any settings?
AnudeepAnudeep (Salesforce Developers) 
Hi Lauren, 

Can you change the url in the href to reflect the MyDomain URL. Also please check the URL in the sandbox and compare it with production. MyDomain URL will be different than the instance URL
<link rel="shortcut icon" href="https://csp1idsre-customer-portal-iata.cs88.force.com/identity/favicon.ico?v=2" />

Let me know if this helps
 
Lauren BLauren B
Hi Anudeep,

Thank you so much for your reply. I have used the following Url in sanbox and production.  I am using custom url for community in production.

In Sanbox-  <link rel="shortcut icon"  href="https://acc-member.cs32.force.com/favicon.ico?v=2"/> (favicon reflecting on the login page)
In Production-  <link rel="shortcut icon" href="https://nkd.jonp.com/member/favicon.ico?v=2"/> (Not reflecting)
Lauren BLauren B
Is there anything else i have to check? Please let me know. I am not getting why its not working with custom url. I tried above steps and it reflected for some time and then its gone. Thank you.