Skip to content

Favicon guide

How to add a favicon to an HTML website

Adding a favicon takes two steps: put the icon files on your server, then tell the browser where they are with a few tags in your page's <head>.

Updated November 11, 2026

1. Get your favicon files

You need these files (see favicon sizes for why):

  • favicon.ico with 16, 32, and 48 px sizes inside
  • favicon.svg
  • apple-touch-icon.png (180×180, solid background)
  • android-chrome-192x192.png and android-chrome-512x512.png
  • site.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.ico directly. 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.

Make your favicon in a minute

FavMint is a free favicon generator that runs in your browser. Design an icon from letters, symbols, or 2,100+ icons, check it at real sizes, and download the full package: favicon.ico, SVG, PNGs, the Apple touch icon, Android icons, and site.webmanifest. No signup, nothing uploaded.