Site Favicon Missing In Google Search Results

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Ideas Centre
User avatar
ChinaGal
Registered User
Posts: 162
Joined: Fri Jan 24, 2020 10:02 am

Site Favicon Missing In Google Search Results

Post by ChinaGal »

Our site has a favicon, which comes up correctly in browsers when visiting our site, but not in Google search results.

Google says:
Add a <link> tag to the header of your home page with the following syntax: <link rel="shortcut icon" href="/path/to/favicon.ico">
Is there an easy way to fix this?

Thank you.

User avatar
warmweer
Jr. Extension Validator
Posts: 4287
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Site Favicon Missing In Google Search Results

Post by warmweer »

ChinaGal wrote:
Tue Mar 10, 2020 10:02 pm
Is there an easy way to fix this?
There's no fix necessary as nothing is broken, but if it's important for you then just do as Google suggests, + for each style you're using.
We should embrace problems, without which there wouldn't be any solutions.

User avatar
EA117
Registered User
Posts: 1391
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Site Favicon Missing In Google Search Results

Post by EA117 »

The possibility that comes to mind is that your site is relying on the "legacy" behavior, meaning "if there wasn't any favicon file and location explicitly specified in the <head> section of the document, simply attempt to get /favicon.ico in case that file exists." And what Google is recommending here is "rather than depend on legacy behavior of individual web browsers, specify a favicon file name and path in the <head> section instead."

This can be added to the /template/overall_header.html template of the style you're using. For example, ours has a section added like this:

Code: Select all

<!-- begin EA117 custom favicon modifications -->

<link rel="apple-touch-icon" sizes="180x180" href="{T_THEME_PATH}/images/apple-touch-icon.png?v=zXbdKz68p3">
<link rel="icon" type="image/png" sizes="32x32" href="{T_THEME_PATH}/images/favicon-32x32.png?v=zXbdKz68p3">
<link rel="icon" type="image/png" sizes="16x16" href="{T_THEME_PATH}/images/favicon-16x16.png?v=zXbdKz68p3">
<link rel="manifest" href="{T_THEME_PATH}/images/site.webmanifest?v=zXbdKz68p3">
<link rel="mask-icon" href="{T_THEME_PATH}/images/safari-pinned-tab.svg?v=zXbdKz68p3" color="#5bbad5">
<link rel="shortcut icon" href="{T_THEME_PATH}/images/favicon.ico?v=zXbdKz68p3">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">

<!-- end EA117 custom favicon modifications -->
We have placed all the assets generated by https://realfavicongenerator.net/ into the /images folder of the style, and then modified the overall_style.html template to pull them from there. if you're not worried about all the other platform-specific assets, handling just the "shortcut icon" ink this way is fine too. Note the "?v=zXbdKz68p3" version value is completely arbitrary, and exists just so that you can change it's value if necessary in the future, in order to "force" visitors to ignore previously-cached assets and pull new ones that you have updated.

I'm guessing there is probably an extension that could do this for you too, if you're not already having to maintain a customized style anyway.

User avatar
ChinaGal
Registered User
Posts: 162
Joined: Fri Jan 24, 2020 10:02 am

Re: Site Favicon Missing In Google Search Results

Post by ChinaGal »

Thank you both for your answers. After reading your replies it reminded me we had done this already when were first put up our site. I then went back and looked at what we had added in the overall_header.html of ProSilver and also the theme we are using. And in both cases the code Google said to add was already there. So I was a bit confused. But then after a bit of a closer look I realized we made a small error on the code line. We fixed it now, so hopefully this resolves the issue.

We had:

Code: Select all

<link rel="shortcut icon" href="/path/to/favicon.ico" />
And should be

Code: Select all

<link rel="shortcut icon" href="/path/to/favicon.ico">
Do you think this is the problem as to why it isn't showing up in Google searches?

By the way, we have it in the overall_header.html just one line above </head>. Is this correct placement?

Thanks again.

User avatar
EA117
Registered User
Posts: 1391
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Site Favicon Missing In Google Search Results

Post by EA117 »

ChinaGal wrote:
Wed Mar 11, 2020 6:30 am
Do you think this is the problem as to why it isn't showing up in Google searches?
From what I understand, nothing "should" care whether <link> was given a self-closing tag indication in HTML5 like phpBB styles generate by default. But that doesn't really answer whether Google "did" care, or what they might have done or dropped in response to that. I might also try running a validator like https://validator.w3.org/ against the page, just to make sure there isn't some kind of other subtle un-closed tag that is affecting the interpretation of the subsequent <link> tag, without being "an issue with the syntax of the <link> tag itself."

ChinaGal wrote:
Wed Mar 11, 2020 6:30 am
By the way, we have it in the overall_header.html just one line above </head>. Is this correct placement?
Yes, most any placement before the <head> tag closes should be fine, including that one.

User avatar
ChinaGal
Registered User
Posts: 162
Joined: Fri Jan 24, 2020 10:02 am

Re: Site Favicon Missing In Google Search Results

Post by ChinaGal »

Thanks again. Yes, I am not sure if Google cares of not about self-closing tags, but I assume they do if they give a certain code string for Favicons and expect you to follow it. Let's give it a few days and see if it gets fixed in Google search results now that I corrected it. I will report back in a couple more days if it has been fixed or not.

Thanks for https://validator.w3.org/ - I ran it and it found a few small things in the overallfooter.html with regards to edits we made and which I now fixed. But no errors with regards to the favicon that might effect Google.

There are still a couple of small errors we can't seem to fix though. Attached is a screen shot from validator showing the remaining errors. For the first one we looked in the overallheader and overallfooter and not sure where the code is located that they are referring to. Any ideas perhaps?

On the second and third errors they are related to a link we added into to the footer, which links to a topic on our site about copyright. So it seems it doesn't like the format of the URL that phhBB creates for topics. Is there any way I can change the format of the URL so it doesn't cause these errors?

Screen.jpg

User avatar
EA117
Registered User
Posts: 1391
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Site Favicon Missing In Google Search Results

Post by EA117 »

ChinaGal wrote:
Wed Mar 11, 2020 9:37 pm
For the first one we looked in the overallheader and overallfooter and not sure where the code is located that they are referring to. Any ideas perhaps?
If you're not seeing the <style> tag used literally inside the overall_header.html template itself, then I would suspect what you're seeing is a <style> block being output by one of the extensions. Either during the overall_header_head_append or overall_header_stylesheets_after events, or through the INCLUDECSS directive, which become output where you see the {$STYLESHEETS} reference in overall_header.html.

There is likely no way to accurately say without seeing the full contents of that <style> tag in the rendered HTML document, and making an educated guess based on the names of the classes or elements its attempting to style.

ChinaGal wrote:
Wed Mar 11, 2020 9:37 pm
On the second and third errors they are related to a link we added into to the footer, which links to a topic on our site about copyright. So it seems it doesn't like the format of the URL that phhBB creates for topics. Is there any way I can change the format of the URL so it doesn't cause these errors?
The report seems to be calling out simply the difference between <a href=viewtopic.php?f=2&t=260>Full Disclaimer</a> and <a href="viewtopic.php?f=2&t=260">Full Disclaimer</a>. i.e. The value of the href= attribute is not in quotes. Is that not actually the case?

User avatar
ChinaGal
Registered User
Posts: 162
Joined: Fri Jan 24, 2020 10:02 am

Re: Site Favicon Missing In Google Search Results

Post by ChinaGal »

Thank you. On the style type="text/css error, I have combed through the overallheader and overallfooter in all my styles and I can't find it anywhere. I did run the site through https://search.google.com/structured-data/testing-tool and I see that bit of code come up in the results, but that still doesn't define where it is. So I guess we are going to have to live with that one error for the reasons you mentioned in that it may be caused by one of our extensions.

Thank you for catching that missing quotes issue. That is all fixed now and the error messages on that are gone.

User avatar
EA117
Registered User
Posts: 1391
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Site Favicon Missing In Google Search Results

Post by EA117 »

If you're able to do a "view source" in the web browser on one of your pages the report cites this issue for, and find the <style> block which uses <style type="text/css"> as its opening tag, and then cut and paste everything from that opening <style type="text/css"> tag to the countervailing </style> tag, we might be able to guess which extension based on the class names or elements targeted by the contained CSS.

Or if you were willing to publicly post or PM a link to one of the pages, we would be happy to look at the page source directly. But no worries if you'd rather not do it that way.

In this particular case, none of these were gross or overly fatal syntax issues, and your site would have likely ran its entire life just fine even with them. But there shouldn't be anything stopping them from being identified and addressed, either.

If you wanted to keep searching yourself, one of the possibilities we'd be expecting is that a overall_header_head_append.html or overall_header_stylesheets_after.html template under /ext/author/extension_name/styles/all/template/event/ in one of the installed extensions contains the <style type="text/css"> block. It's not necessarily being done that way, but it's one of the possibilities to check and rule out.

User avatar
ChinaGal
Registered User
Posts: 162
Joined: Fri Jan 24, 2020 10:02 am

Re: Site Favicon Missing In Google Search Results

Post by ChinaGal »

Thank you. You gave me an idea. Then I disabled each of our extensions one by one (we have 19 of them running) and then I ran validator each time to try and see which was causing the problem. About half way through I found out which one it was. It was one that someone did a bit of customization on for us who put that extra type="text/css" in there. So once I knew which extension was, I was able to just go into the extension and remove it. Now all is clear. No more errors from validator. Great, thank you again!

User avatar
ChinaGal
Registered User
Posts: 162
Joined: Fri Jan 24, 2020 10:02 am

Re: Site Favicon Missing In Google Search Results

Post by ChinaGal »

Well, it has been a few days since I fixed the link to our site Favicon in overall_header.html and yet Google still hasn't added our Favicon on mobile devices when searching Google on a mobile browser. Our Favicon is 32x32px and I haven't generated all the other various Favicons using a site like Favicon Generator since we aren't worried about all the other platforms. I am wondering if perhaps it needs to be a different size though for Google to pull it up in search engine results? Maybe we need to reduce it to 16x16?

EDIT:

I just read the following (below) from google on this link: https://support.google.com/webmasters/a ... 0858?hl=en - It says a multiple of 48px. 32px seems like it should be OK, but maybe I need to increase it to 48px?
Guidelines

You must follow these guidelines to be eligible for a favicon next to your search results. Note that a favicon isn't guaranteed in search results even if all guidelines are met.

Both the favicon file and the home page must be crawlable by Google (that is, they cannot be blocked to Google).
Your favicon should be a visual representation of your website's brand, in order to help users quickly identify your site when they scan through search results.
Your favicon should be a multiple of 48px square, for example: 48x48px, 96x96px, 144x144px and so on. SVG files, of course, do not have a specific size. Any valid favicon format is supported. Google will rescale your image to 16x16px for use in search results, so make sure that it looks good at that resolution. Note: do not provide a 16x16px favicon.
The favicon URL should be stable (don’t change the URL frequently).
Google will not show any favicon that it deems inappropriate, including pornography or hate symbols (for example, swastikas). If this type of imagery is discovered within a favicon, Google will replace it with a default icon.

User avatar
Lumpy Burgertushie
Registered User
Posts: 67395
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Site Favicon Missing In Google Search Results

Post by Lumpy Burgertushie »

well, 32 is not a multiple of 48 so I would say yes, follow the google instructions and make it at least 48.

or, you could not worry about it since I seriously doubt it will have any effect on your google ranking that you would ever notice.


luck,
robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?

User avatar
ChinaGal
Registered User
Posts: 162
Joined: Fri Jan 24, 2020 10:02 am

Re: Site Favicon Missing In Google Search Results

Post by ChinaGal »

Thanks. I have changed it to 48 now on our server. Let's give a few more days and see.

User avatar
Forex Station
Registered User
Posts: 89
Joined: Thu Apr 06, 2017 2:26 pm
Location: Sydney

Re: Site Favicon Missing In Google Search Results

Post by Forex Station »

ChinaGal wrote:
Sat Mar 14, 2020 8:30 am
Thanks. I have changed it to 48 now on our server. Let's give a few more days and see.
How did it go for you? We're having similar issues on our site. For us, Google has reverted back to a very old Favicon which we have completely removed from our server years ago so it seems there is a bit of an issue on their end at the moment.
Proudly powered by phpBB for almost 4 years now: forex-station.com :mrgreen:
Global Alexa rank: 48,500

User avatar
ChinaGal
Registered User
Posts: 162
Joined: Fri Jan 24, 2020 10:02 am

Re: Site Favicon Missing In Google Search Results

Post by ChinaGal »

Forex Station wrote:
Fri Mar 20, 2020 5:59 pm
ChinaGal wrote:
Sat Mar 14, 2020 8:30 am
Thanks. I have changed it to 48 now on our server. Let's give a few more days and see.
How did it go for you? We're having similar issues on our site. For us, Google has reverted back to a very old Favicon which we have completely removed from our server years ago so it seems there is a bit of an issue on their end at the moment.
Unfortunately our Favicons are still not showing in any Google search results. We even moved the Google code to the very top of the head in the file and used search console to resubmit our site map to Google to try to get them to crawl again, but still no change on the favicon issue. If we search in DuckDuckGo though then we see our favicon come up within search results for our site.

Post Reply

Return to “phpBB Discussion”