Favicons and Web App Manifests: A Practical Setup Guide
Your favicon is the tiny square that sits next to your page title in a browser tab, in bookmarks and, on Google, next to your site name in the search results. When someone saves your site to their phone's home screen, a larger icon takes its place. Small as they are, these icons are often the first visual sign of your brand that a customer sees.
Getting them right is not hard, but the rules are spread across browser documentation, Apple's conventions, the Web Application Manifest specification and Google's own favicon guidelines. This guide pulls them together: which files you actually need, which sizes, how Google chooses the icon it shows in search, and how to write a simple web app manifest so your icon looks sharp everywhere.
Key facts
- 48 × 48 — Google recommends a favicon larger than this, in pixels, so it looks good in search results
- 1:1 — Favicons for Google Search must be square, and at least 8 × 8 pixels
- 192 & 512 — Icon sizes in pixels that Chromium browsers require in a manifest for an installable web app
- 40% — Radius of the centred safe-zone circle for maskable icons, as a share of the icon width
Favicons, Touch Icons and Manifest Icons Are Different Things
People use "favicon" for every site icon, but there are really three kinds, and each is found a different way:
- The favicon is declared with
<link rel="icon">in the page's<head>. Browsers show it in tabs, bookmarks and history, and Google uses the one on your home page in search results. - The Apple touch icon is declared with
<link rel="apple-touch-icon">. MDN notes that iOS does not userel="icon"or itssizesattribute to pick the icon for a home-screen shortcut; it uses this non-standard link instead. - Manifest icons are listed in a separate JSON file, the web app manifest. MDN describes them as the icons used on the home screen, dock, taskbar, app switcher and splash screen when a site is installed as an app.
A small business site does not need to be a full progressive web app to benefit from all three. Each one costs a few lines of HTML and a few image files, and together they make your brand look consistent wherever your site appears.
The HTML Your Pages Need
A sensible, modern set of tags for the <head> of every page looks like this:
<link rel="icon" href="/favicon.ico" sizes="48x48">
<link rel="icon" href="/favicon.svg" type="image/svg+xml" sizes="any">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/site.webmanifest">A few details explain why it is written this way:
- Multiple icons are fine. MDN explains that when there are several
rel="icon"links, the browser uses theirmedia,typeandsizesattributes to pick the most appropriate one, and if a chosen icon turns out to be unusable, for example an unsupported format, it moves on to the next best. sizes="any"is for vector files. MDN's<link>reference saysanymeans the icon can be scaled to any size because it is in a vector format such asimage/svg+xml. For raster files, list the real pixel sizes, such as48x48.- Drop
shortcut. You will still seerel="shortcut icon"in old themes. MDN calls theshortcutkeyword non-conforming and says authors must not use it any more. Google still accepts it for historical reasons, but plainiconis the correct value.
Why keep a PNG or ICO alongside an SVG?
An SVG favicon stays crisp at every size and is usually tiny. But Google's favicon documentation lists the formats Google Search supports as BMP, GIF, ICO, PNG, JPEG, PPM and TIFF; SVG is not on that list. Keeping a raster favicon declared on your home page means Google always has a file it can use, whatever browsers do with the SVG.
How Google Chooses the Favicon in Search Results
Google shows a favicon next to each result, and its Search Central guidelines are specific about how it finds yours:
- It must be on the home page. Google reads the favicon from your home page only. Domain and subdomain home pages are supported (
example.comorshop.example.com), but a subdirectory such asexample.com/shop/cannot have its own favicon in search. - One favicon per hostname.
www.example.comandblog.example.comcan each have a different icon; pages inside one hostname all share it. - Square, and bigger than 48 × 48. The icon must have a 1:1 aspect ratio and be at least 8 × 8 pixels, but Google recommends a favicon larger than 48 × 48 pixels so it looks good on different surfaces.
- It must be crawlable. Googlebot must be able to crawl your home page, and Googlebot-Image must be able to crawl the favicon file. Neither can be blocked by robots.txt or anything else, such as a firewall rule that only lets browsers through.
- Keep the URL stable. Google asks you not to change the favicon URL often, and the icon should visually represent your brand.
Google also accepts apple-touch-icon links, and the file can live on a CDN. After a change, Google says it can take several days to several weeks for the new icon to appear; you can speed up the recrawl by requesting indexing of the home page with Search Console's URL Inspection tool. Meeting every guideline does not guarantee that a favicon is shown, and Google replaces inappropriate imagery with a default icon.
Writing a Simple Web App Manifest
The web app manifest is a small JSON file that tells browsers and operating systems your site's name, colours and icons. MDN notes that the specification defines the .webmanifest extension and that servers should send it with the Content-Type: application/manifest+json header, although browsers generally accept a .json file too. A minimal manifest for a business site:
{
"name": "Example Plumbing",
"short_name": "Example",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#0b3d91",
"icons": [
{ "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" },
{ "src": "/icon-maskable-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
]
}What the fields do
- name and short_name: the full name, and a shorter one for places with little space, such as under a home-screen icon.
- start_url: the page that opens when someone launches the saved site.
- display: how it opens;
standalonelooks like an app, without the browser's address bar. - background_color and theme_color: used for the splash screen and the app's interface.
- icons: an array of image objects. Only
srcis required, and relative paths are resolved against the manifest's own URL, so absolute paths starting with/avoid surprises.
Installability
If you want browsers to offer "Install" for your site, MDN lists what Chromium browsers (Chrome, Edge and Samsung Internet) require in the manifest: a name or short_name, icons that include a 192 px and a 512 px icon, a start_url, a display or display_override value, and prefer_related_applications either false or absent. The site must also be served over HTTPS.
Icon Sizes, Formats and Maskable Icons
Each icon object can carry three optional hints alongside src. MDN describes them this way:
- sizes: exact sizes such as
192x192for PNGs, oranyfor an SVG. - type: the MIME type, such as
image/png. Declaring it lets browsers skip formats they do not support without downloading them. - purpose:
any(the default),maskableormonochrome.
Maskable icons
Android crops app icons into circles, squircles and other shapes. A normal icon gets shrunk and placed on a white background, which often looks poor. A maskable icon is designed to be cropped: web.dev explains that it must be opaque, with padding, and that your logo should sit inside a centred circle whose radius is 40% of the icon's width, because the outer edges may be cut off. You can preview the crop with the Maskable.app tool or in the Icons section of Chrome DevTools' Application panel.
web.dev advises against giving one icon "purpose": "any maskable". A maskable icon used as a normal icon carries extra padding and looks small, so provide a separate standard icon with a transparent background and a separate maskable one, as in the example above.
Start from a big master
MDN recommends designing the master icon at 1024 × 1024 pixels or larger, or as an SVG that scales to that size, then exporting PNGs. At 16 or 32 pixels fine detail turns to mush, so a simplified mark, such as a single letter or symbol from your logo, usually works better than the full logo with a tagline.
A Checklist for Small Business Sites
- Design one square master icon from your logo, simple enough to read at 16 pixels.
- Export
favicon.ico(or a 48 × 48 or larger PNG),favicon.svg, a 180 × 180apple-touch-icon.pngwith a solid background, and 192 and 512 pixel PNGs for the manifest, plus a maskable 512 version with padding. - Add the four
<link>tags to the shared header so every page, and above all the home page, has them. - Create
site.webmanifestand serve it with theapplication/manifest+jsoncontent type. - Check that robots.txt, your firewall and any security plugin let Googlebot and Googlebot-Image fetch the home page and the icon files. If you run a Content Security Policy, MDN notes that manifest icons are governed by its
img-srcdirective. - Open Chrome DevTools, go to Application, then Manifest, and look for warnings about the manifest and icons.
- Request indexing of the home page in Search Console, then be patient: Google's own estimate is days to weeks.
Chrome's Lighthouse guidance for the touch icon is a useful extra check: use a 180 × 180 or 192 × 192 pixel icon with a non-transparent background, and note that the old apple-touch-icon-precomposed value has been obsolete since iOS 7.
Sources
- Google Search Central: Define a favicon to show in search results
- MDN: HTML attribute rel
- MDN: The <link> element
- MDN: Web application manifest
- MDN: Manifest icons member
- MDN: Define your app icons
- MDN: Making PWAs installable
- web.dev: Adaptive icon support in PWAs with maskable icons
- Chrome for Developers: Does not provide a valid apple-touch-icon
- W3C: Web Application Manifest
Related reading
Frequently asked questions
What size should my favicon be?
Square, and larger than 48 × 48 pixels, which is Google's recommendation for search results. A common set is a 48 × 48 favicon.ico or PNG, an SVG favicon, a 180 × 180 Apple touch icon, and 192 and 512 pixel PNGs in the web app manifest.
Why is Google still showing my old favicon or a blank globe?
Google reads the favicon from your home page and needs time to recrawl it; it says this can take several days to several weeks. Check that the icon is declared on the home page, is square, and is not blocked from Googlebot or Googlebot-Image, then request indexing in Search Console.
Do I need a web app manifest if my site is not an app?
It is optional, but it is a small file that gives Android and desktop browsers proper icons, a name and colours when someone saves or installs your site. If you want browsers to offer an install option, Chromium browsers also need 192 and 512 pixel icons, a start_url and a display value in it.
Want your site to look sharp in every tab and on every home screen?
Tell me about your business and I'll send a free, no-obligation quote for a site with a complete, correctly sized icon set and web app manifest.
Get a free quote