Before you begin
Prepare a square master with one simple form. Test light and dark tabs. Do not put a photograph and tiny tagline into the icon just because the main logo contains them.
Text explanation of the diagram
Master → 16 / 32 px → Test the tab. A W inside a square remains distinguishable at 16 px. The full words Web Article do not. Prepare both and compare at the actual small size.
Favicon sizes: browser tabs, Google and Yandex
- Browser tab
- Check legibility at 16×16 and 32×32. An ICO can contain several raster sizes of the same mark.
- Google Search
- Square, at least 8×8; Google recommends larger than 48×48. The example below uses a 120×120 PNG.
- Yandex
- 120×120 PNG or SVG for a sharper mark; 16×16 and 32×32 are also accepted.
The sizes attribute must describe the actual file. The value any identifies a scalable SVG; it does not turn a raster ICO into a vector.
The tab and search results update independently. Check that crawlers can fetch the home page and icon; a recrawl request does not guarantee display.
The procedure
- Draw the mark as vector artwork or a large raster image. Keep a safe margin so a letter or circle is not accidentally clipped.
- Prepare favicon.ico for compatibility and SVG or PNG for modern browsers. Create a suitable square PNG separately for a home-screen icon.
- Add link elements to head. Request each actual file directly: it should return 200 with the correct type and image. Check the browser cache after a replacement. Keep the favicon URL stable for search; do not rename it on every site release.
<link rel="icon" href="/favicon.svg" type="image/svg+xml" sizes="any">
<link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="16x16 32x32 48x48 64x64 128x128 256x256">
<link rel="icon" href="/favicon.png" type="image/png" sizes="120x120">A worked example
A W inside a square remains distinguishable at 16 px. The full words Web Article do not. Prepare both and compare at the actual small size.
Check the result
Inspect a tab, bookmark and dark theme. The icon should not be empty, cropped or easily confused with another project.
A common mistake
Renaming a PNG to .ico does not convert its format. Use a real export or a trusted converter.
Sources and next steps
- MDN — link rel=icon
- Как сделать иконку favicon.ico для своего сайта — 2008-12-25 (RU)
Choose dimensions and check a text mark’s contrast with the browser tools. Then compare it in an actual small tab.