Site logo

Archived topic

favicon.ico not working in google mobile search

5 replies · Started by Rostyslav on May 6, 2021

Viewing posts 1–6 of 6

Hello,

I have followed your steps about how to add a favicon.

I generated a 48x48px favicon and added it to the root of my Wordpress.
After that I created an element>hook>wp_head>display in all site with this code:
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">

After almost a week google shows me the WordPress default favicon: https://ibb.co/7JHpGjm
(I have indexed the site like 20 times)

Is there any way to delete that default WordPress favicon in order to force Google to show mine?

Hi there,

Can you try changing the favicon.ico's pathing to an absolute path? relative paths can cause issues.

Example:

<link rel="shortcut icon" type="image/x-icon" href="https://yoursiteurl.es/favicon.ico">

Is there any way to delete that default WordPress favicon in order to force Google to show mine?

Your site isn't loading any WP favicons so there's nothing to remove. If you inspect your site's header, it only loads the one you specified.

Here's what I'd do though:

I'll add the favicon to the recommended WordPress way of adding it (since 5.4) which is to add it on Appearance > Customize > Site Identity and actually follow the sizing(512x512).

I'll make sure any sort of caching is purged as well. Especially the server/hosting sided ones.

And see if Google indexes it properly this time.

I’ll add the favicon to the recommended WordPress way of adding it (since 5.4) which is to add it on Appearance > Customize > Site Identity and actually follow the sizing(512×512).

I did it 2 months ago and it didn't work, this is why I trying another way.

I typically only add the favicon.ico file to the site root and nothing else - no hooks or <link> elements. That's what this site is doing.

However, it's difficult to say why Google wouldn't display a favicon in their listings. It isn't something the theme has any say over, unfortunately.

Hi,

Should I delete the default WordPress favicon.ico file before adding mine via FTP?

Hi there,

yes you should delete the default ico file first.

This archived topic is closed to new replies.