Hello everyone,
I’m having some trouble setting up my Shopify store’s Favicon to show in the Google search index; it’s showing correctly in the tab, as well as the the shortcut tabs in the google homepage. But when I look it up in Google search, it’s the default globe logo.
I’ve tried:
-
Clearing my browser’s cache & history
-
Using a completely different browser
This was the original setting on my theme for the favicon:
{%- if settings.favicon != blank -%}
<link rel="icon" type="image/png" href="{{ settings.favicon | image_url: width: 32, height: 32 }}">
{%- endif -%}
Waited a few weeks and while it showed in the chrome tab, it still wasn’t showing Google search (cleared cache and history this attempt and all others afterward). I looked through some of the existing community threads and one recommended using the below (basically setting a favicon based on each platform / size):
{%- if settings.favicon != blank -%}
<link rel="apple-touch-icon" sizes="180x180" href="xxlinkxx">
<link rel="icon" type="image/png" sizes="32x32" href="cdnlinkxx">
<link rel="icon" type="image/png" sizes="16x16" href="cdnlinkxx">
<link rel="manifest" href="cdnlinkxx">
<link rel="mask-icon" href="cdnlinkxx" color="#5a0f75">
<meta name="msapplication-TileColor" content="#603cba">
<meta name="theme-color" content="#ffffff">
{%- endif -%}
I know the change took effect because the tab’s favicon altered slightly with the change in size. I’ve since waited another month, went to the Google Console and requested the site to be crawled. Still nothing.
Today I spoke to Shopify support and they provided an article that suggested adding this line:
<link rel="shortcut icon" href="{{ settings.favicon | image_url: '32x32' }}" type="image/png">
So I’ve added that line to the current block, it looks like this now:
{%- if settings.favicon != blank -%}
<link rel="apple-touch-icon" sizes="180x180" href="xxlinkxx">
<link rel="icon" type="image/png" sizes="32x32" href="cdnlinkxx">
<link rel="icon" type="image/png" sizes="16x16" href="cdnlinkxx">
<link rel="manifest" href="cdnlinkxx">
<link rel="mask-icon" href="cdnlinkxx" color="#5a0f75">
<meta name="msapplication-TileColor" content="#603cba">
<meta name="theme-color" content="#ffffff">
<link rel="shortcut icon" href="{{ settings.favicon | image_url: '32x32' }}" type="image/png">
{%- endif -%}
Anything I may be missing here? It’s worth noting the site is “locked” so I’m not sure if that may be preventing Google’s crawler from accessing the the favicon in the theme.liquid file, would I need to set this on the password page code file as well?
EDIT I checked and this line exists in the password.liquid code already:
{%- if settings.favicon != blank -%}
<link rel="icon" type="image/png" href="{{ settings.favicon | image_url: width: 32, height: 32 }}">
{%- endif -%}
I’ll be replacing it with what I have in the theme.liquid page, but it still doesn’t make sense to me as the chrome tab was able to pick this up still?