retype icon indicating copy to clipboard operation
retype copied to clipboard

Add the necessary meta data for Google Search icon

Open DannyBen opened this issue 11 months ago • 3 comments

Retype sites - including retype.com - do not show an icon in Google Search results:

Image

I found information on it here: Define a favicon to show in search results

which states that this should be added to the head:

<link rel="icon" href="/path/to/favicon.ico">

although I cannot be 100% that this is the solution.

DannyBen avatar Jan 28 '25 13:01 DannyBen

By default, Retype does not automatically add the <link rel="icon"> meta tag, but the favicon is added to the default root location in the output, see https://retype.com/favicon.ico. Why this is not being picked up by Google in your sample and used within the search results is unknown.

This default location should be (or at least previously was) automatically discovered by the Google crawler and explicitly adding the meta tag was not required. I see that it is now at least recommended and likely good practice to add the meta tag.

If Retype detects a favicon, we can look into automatically adding the meta tag. Until that enhancement is built and released, if you would like to include the meta tag in your project, you can use the following _includes/head.html template:

<!-- Add content to _includes/head.html to include here -->
<link rel="icon" href="/favicon.ico">

Hope this helps.

geoffreymcgill avatar Jan 28 '25 14:01 geoffreymcgill

you can use the following _includes/head.html template:

Already done for https://bashly.dev as a test.

Why this is not being picked up by Google in your sample

You say my sample - does it show for anyone else? I see the missing icons also in Bing:

Image

although, I do see it for retype.com (bing also):

Image

DannyBen avatar Jan 28 '25 14:01 DannyBen

Because you have the favicon.ico as a file copied into the root of your project, you should not require the _includes/head.html file.

I also see the favicon.icon in your runfile-book project, so that should automatically work too. When I bookmark either of your projects, I see the favicon used in the bookmark.

Theoretically, it should all be working fine. Be sure to let me know if you isolate a reason why it is failing to get picked up in the Google search results.

geoffreymcgill avatar Jan 28 '25 14:01 geoffreymcgill