Use Favicon in 2025

Most favicon guides aim for broad compatibility across every platform and device which leads to complex setups with many icon files and HTML tags to manage.

How to Favicon in 2025: Three files that fit most needs—Martian Chronicles is a great starting point, but I want to go further and find the absolute minimal setup that still works well in modern browsers.

No-code solution

Serving favicon.ico at the domain root (e.g., site.com/favicon.ico) is one of the best solutions. It doesn’t require any HTML and forces the use of a single file format.

It may fall short if a theme-based favicon is needed.

HTML solution

When it’s not possible to serve favicon.ico at the domain root level, adding HTML tag is needed:

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

The cost of simplicity

I settled on 48px for the favicon size. It’s large enough for the places where favicons are displayed in the desktop and mobile browsers that I tested.

I choose not to use rel="apple-touch-icon". If I ever need iOS support, I’ll look into the web application manifest, where it’s possible to specify even more icons.

Problem with SVG favicon

I initially thought that SVG would be the best format. Unfortunately, I found that YouTube converts SVG favicons without preserving transparency. Since I don't expect Google/YouTube to fix this, I’ve decided to abandon SVG in favor of ICO/PNG.

Favicons displayed for links on YouTube channel profile
Favicons displayed for links on YouTube channel profile
Favicons displayed for links on YouTube channel profile
Favicons displayed for links on YouTube channel profile