Glossary

Favicon

The small icon a website declares to represent itself in browser tabs, bookmarks, search results and link previews.

A favicon is the small icon a website uses to represent itself, shown in browser tabs, bookmark lists, history, search results, home screen shortcuts and link previews. The site declares it with a link element in the page’s head, or relies on the browser finding a file called favicon.ico at the root of the domain. The name is short for “favourites icon”, from the bookmarks menu where it first appeared.

Favicons began as a single 16 by 16 pixel ICO file introduced with Internet Explorer 5 in 1999. Today a site typically ships a small family of icons for different surfaces: a classic ICO or PNG for tabs, larger PNGs for high-density screens and app shortcuts, an Apple touch icon for iOS home screens, icons listed in a web app manifest, and often an SVG that scales cleanly. For software that reads web pages, the favicon is part of a page’s URL metadata, alongside the title, description and preview image, and it is one of the cheapest ways to make a list of links recognisable at a glance.

How browsers find a favicon

A page declares its icons with link elements in the head. The common forms are a rel attribute of icon (optionally with a sizes and type attribute), apple-touch-icon for iOS, and a manifest link pointing at a JSON file whose icons array lists larger images for installed web apps. A page can declare several icons, and the browser picks the one that best fits the size and pixel density it needs.

If a page declares nothing, most browsers request /favicon.ico from the root of the domain as a fallback. That convention is why so many sites still keep an ICO file there even when their pages declare PNG or SVG icons. It also means a favicon can be found without fetching or parsing the page at all, which is useful for software that only knows a domain name.

Discovery gets harder in a few common cases. Icon paths can be relative, so they have to be resolved against the page URL or a base element. Some sites inject their head tags with JavaScript, so a client that does not run JavaScript rendering sees no icon declarations. Others serve the icon from a CDN on another domain, behind a redirect chain, or with the wrong content type. A robust fetcher handles all of these, checks the MIME type or the file’s magic bytes with file type detection, and falls back to /favicon.ico when the declared icons fail.

Formats and sizes

There is no single correct favicon size, because each surface asks for something different. The table below lists the combinations most sites provide. Exact recommendations change over time, so check the current guidance from the browsers and platforms you care about.

Icon

Typical size

Format

Where it is used

favicon.ico

16x16, 32x32 and 48x48 in one file

ICO

Browser tabs, the root fallback, older software

Standard icon

32x32 or 48x48

PNG

Tabs and bookmarks on high-density screens

Scalable icon

Any

SVG

Modern browsers that support SVG favicons

Apple touch icon

180x180

PNG

iOS and iPadOS home screen shortcuts

Manifest icons

192x192 and 512x512

PNG

Installed web apps and Android home screens

Search result icon

A multiple of 48x48

PNG, SVG or ICO

Favicons shown beside search results

ICO is an old container format that can hold several bitmaps of different sizes in one file, which is why it still works well as a fallback. PNG is the usual choice for fixed sizes, and newer image formats such as WebP are less widely supported for icons than for photos. SVG favicons scale to any size and can even switch colours for dark mode using a prefers-color-scheme media query inside the file, though support differs between browsers, so most sites keep a PNG or ICO alongside the SVG.

Favicons in search results and link previews

Search engines show favicons beside results, which makes them part of how a site is recognised before anyone clicks. Google, for example, asks for a square icon declared on the home page, with a size that is a multiple of 48 pixels, and may substitute a generic icon if the file is missing, inappropriate or fails to load. The favicon sits beside the page’s meta tags and schema.org structured data as one of the signals a search engine reads about a site.

Link previews use favicons in a similar way. When a chat app, document editor or CRM turns a pasted URL into a card through link unfurling, the card usually shows the site’s icon and name next to the title and description, with a larger og:image above them. Open Graph tags do not define a favicon property, so preview services read the icon from the page’s link elements or the root fallback. A missing or broken favicon is one of the most common reasons a preview card looks unfinished.

Why favicons matter to AI agents and apps

For an agent that works with the web, favicons are small but useful. A research or personal assistant that shows the user a list of sources is easier to scan when each item carries the site’s icon. A sales tool that enriches a list of companies can use favicons as a lightweight visual identity when no logo is available. Bookmark managers, read-later apps and knowledge bases use them to make saved links recognisable months after they were saved.

Favicons also carry a little signal. A favicon that changes can indicate that a domain has changed hands, which is relevant when you are tracking link rot across a collection. Perceptual hashing of favicons is sometimes used to cluster sites that share an owner or a template, and to spot lookalike phishing sites that copy a known brand’s icon. These are heuristics rather than proofs, but they are cheap to compute because the files are tiny.

Icons can also feed simple visual features. Colour extraction on a favicon gives a site’s dominant brand colour, which some interfaces use to tint a preview card, and image embeddings of icons can group visually similar sites. Neither replaces the page’s own content as a source of truth, but both are inexpensive additions to a stored link record.

Fetching favicons safely and efficiently

Fetching icons at scale has the same concerns as any other crawling. Send an honest user agent, respect robots.txt, cache results (favicons change rarely), and set short timeouts so one slow server does not hold up a whole preview. Treat the response as untrusted input: verify that it is an image, cap the file size, and decode it in a way that cannot be exploited by a malformed file. Many systems re-encode every fetched icon to PNG at a fixed size, which normalises odd formats and strips anything unexpected.

There are privacy considerations too. Researchers have shown that browser favicon caches can be abused to fingerprint visitors across sessions, and browsers have tightened their caching behaviour in response. For a server-side fetcher the main concern is the reverse: fetching an icon reveals your server’s interest in a domain, and fetching arbitrary user-supplied URLs from your infrastructure needs the usual protection against requests to internal addresses.

A worked example

Suppose an app lets users save links, and you want each saved item to show an icon. For a URL on a well-built site, the page declares a 32 by 32 PNG and a 180 by 180 Apple touch icon, and you choose the PNG for the list view and the larger icon for a detail view. For a single-page app that injects its head with JavaScript, a plain HTML fetch finds nothing, so you either render the page or fall back to /favicon.ico. For a site with no icon at all, you show a neutral placeholder or the first letter of the site name. Across a sample of a few thousand saved links you would expect a mix of all three, which is why preview services do the rendering and fallbacks for you.

Where Exabase fits

The free Exabase Link Preview API returns a favicon for any public URL as part of its response, next to the url, title, description, site name, detected type and preview image. The favicon and image each come with a pre-signed URL, width and height, so your app can display or store them without fetching the original file. Pages are rendered with JavaScript before parsing, redirects are followed, and results are cached for up to 24 hours. The link preview guide and the PresignedImage model document the fields, and the Link Preview API roundup compares the service with alternatives. The story behind the free tier explains why 20,000 previews a month cost nothing.

When an agent saves a URL as a bookmark in Resources, Exabase fetches the page and stores a capture that includes the title, description, site name, favicon, a screenshot and a reader-mode version of the page, so the icon stays with the saved item even if the site later changes. Bookmarked content is indexed and searchable through Deep Search. For company brand marks rather than site icons, the logo API tool page and the logo API roundup are the better starting points, and Exabase vs Brandfetch compares the two approaches. In each case Exabase fetches and returns the asset; how your interface uses it is up to you.

FAQs

What size should a favicon be?

There is no single size. Most sites provide a favicon.ico with 16, 32 and 48 pixel versions, a 180 by 180 Apple touch icon, and 192 and 512 pixel icons in a web app manifest. Many also add an SVG that scales to any size.

Do I still need a favicon.ico file?

It is still worth keeping one at the root of the domain. Browsers and other software request /favicon.ico when a page declares no icon, and some tools only check that path.

Can a favicon be an SVG?

Yes, in browsers that support SVG favicons. An SVG icon scales cleanly and can adapt to dark mode, but support varies, so most sites also provide a PNG or ICO fallback.

Why is my favicon not showing in search results?

Search engines cache favicons and recrawl them on their own schedule, so changes can take time to appear. Check that the icon is declared on the home page, is square, follows the engine’s size guidance and is not blocked by robots.txt.

How do I get a website’s favicon programmatically?

Fetch the page, read its icon link elements, resolve their URLs and download the best match, falling back to /favicon.ico. The Exabase Link Preview API does this for you and returns the favicon with a pre-signed URL and its dimensions.

Is a favicon the same as a logo?

No. A favicon is a small square icon optimised for tabs and lists, often a simplified mark or a single letter. A logo is the full brand mark, usually wider and more detailed, and is better sourced from the company’s brand assets or a logo service.

Related pages: link preview, Open Graph, og:image, meta tags, URL metadata, link unfurling, schema.org structured data, Link Preview API, best link preview API, best logo API

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.