1. Get your favicon files
You need these files (see favicon sizes for why):
favicon.icowith 16, 32, and 48 px sizes insidefavicon.svgapple-touch-icon.png(180×180, solid background)android-chrome-192x192.pngandandroid-chrome-512x512.pngsite.webmanifest
If you don't have them yet, design a favicon in FavMint and click Download full package. The ZIP contains all of them.
2. Upload them to your site root
Copy the files into the same folder as your home page's index.html, so they load from URLs like https://example.com/favicon.ico. Keeping favicon.ico at the root matters because some browsers and tools request that exact path even when your HTML doesn't mention it.
3. Add the tags to your <head>
Paste this inside <head> on every page (or in the shared header template):
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My site</title>
<link rel="icon" href="/favicon.ico" sizes="32x32">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/site.webmanifest">
</head>The paths start with / so they work from any page, including ones in subfolders. If your site lives in a subfolder (for example on GitHub Pages at username.github.io/project/), use relative paths like href="favicon.ico" or include the folder: href="/project/favicon.ico".
4. Check it worked
- Open your site in a new private window. The icon should appear in the tab.
- Visit
https://your-site.com/favicon.icodirectly. It should show the icon, not a 404 page. - Still seeing the old icon? Browsers cache favicons hard. See favicon not showing.
The minimal version
If you only want one line and one file, this works in every current browser:
<link rel="icon" href="/favicon.ico" sizes="32x32">You'll miss the sharp SVG icon on high-resolution screens and the proper home screen icon on phones, but it's a fine start.