favicon.ico path is not specified if option "I will place favicon files at the root of my web site" is chosen

Created on 3 January 2024, 11 months ago

Problem/Motivation

When asked for the "path" in realfavicongenerator.net, if you select "I will place favicon files (favicon.ico, apple-touch-icon.png, etc.) at the root of my web site. Recommended.", the following line is not added in the generated tags :
<link rel="shortcut icon" href="/favicon.ico">
Because it assumes it's in the root of the website, and browsers will find it because it's the default path built-in in browsers.

But as the icons will actually end up in a subdirectory and the file is not linked to any tag, it's not visible.

It seems that Bing struggles to find/update the favicon in SERPs without it (even though it shouldn't)
Furthermore, some business software or scripts rely on a search of the favicon.ico file to find the icon.

If you choose "I cannot or I do not want to place favicon files at the root of my web site.(...)", the tag is properly generated by realfavicongenerator.net because it will not be in the root of the website.

If you test your site with https://realfavicongenerator.net/favicon_checker
Without the favicon.ico line :

With the favicon.ico line :

Proposed resolution

Add a checkbox to force the addition of the <link rel="shortcut icon" href="/favicon.ico"> tag by Drupal, with correct path.

📌 Task
Status

Active

Version

2.0

Component

Miscellaneous

Created by

🇫🇷France cyrille.miskiewicz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024