Onebox uses wrong URL for the favicon in link preview

I noticed the favicons are broken for some of our websites in the onebox preview of a link.

For example:

On this website (https://invantive.com/products/invantive-control-for-excel.html) the favicon URL is:

<link rel="shortcut icon" href="https://invantive.com/favicon.ico">

But the broken favicon in the preview shows the following favicon URL:

<img src="https://invantive.com/products/invantive-control-for-excel.html/favicon.ico" class="site-icon">

It seems to simply take the link URL and adding ‘/favicon.ico’ to the end of that path.

Any idea how to fix this?

Joshua

It looks to me like its working

https://invantive.com/products/invantive-control-for-excel.html

https://invantive.com/

As you can see in the first preview, there is no favicon, since onebox created it’s own URL.

Your example looks like this one my machine, so no favicon:

onebox takes the og:image

But it uses the favicon as the little image next to the title:

image

This works for invantive.com, since it takes that URL and adds ‘/favicon.ico’ to the URL, which is the correct URL.

However for the other example, it creates the favicon URL by using the link URL and adding ‘/favicon.ico’, which isn’t the favicon URL used on that page (it’s 'https://invantive.com/favicon.ico' on that page too) and thus creating a broken image.

Oh, now i see what you mean

image

Correct!

But strangely enough, it seems in your preview it doesn’t show the broken image anymore, but no image at all, not sure why it chose to entirely ignore the favicon.

Happened just a few minutes after my screenshot, where you can see there’s a missing image (there’s some empty space before the title in my screenshot).

1 Like