How to Add a Favicon to a Website

The complete walkthrough — files, folder placement, the exact HTML, the manifest, plus the cache-clearing step that makes the new icon actually appear.

🧱 Works with any stack 📋 Copy-paste HTML 🆓 No signup

Last updated: September 12, 2026

Short answer

Put favicon.ico in your site's root folder, then paste <link rel="icon" href="/favicon.ico" sizes="any"> into the <head> of every page, alongside the 32×32, 16×16 and Apple Touch Icon links. Then hard-refresh — favicons are cached far longer than normal assets.

Step 1 — Generate your favicon files

Start from a square image, at least 512×512 pixels. Non-square sources get stretched or padded, and small sources can never be upscaled cleanly.

FaviconPal converts your image and produces the whole set locally in your browser — the ICO, the PNG sizes, the HTML snippet and the manifest. Nothing is uploaded to a server.

Prefer to convert a specific source format? Use WebP to ICO, JPG to ICO, SVG to ICO or AVIF to ICO.

Step 2 — Upload the files to your site root

Place the files in the same directory as your index.html, not in a subfolder. Browsers look for favicon.ico at the root of the domain by default, so this location works even before you write any markup.

your-website/ ├── index.html ← the page you are editing ├── favicon.ico ← 16×16 + 32×32 (+ 48×48) in one file ├── favicon-32x32.png ├── favicon-16x16.png ├── apple-touch-icon.png ← 180×180, opaque background ├── icon-192.png ← optional, for Android / PWA ├── icon-512.png ← optional, for Android / PWA └── site.webmanifest ← optional, declares the two icons above
Common mistake: uploading the icon to /images/favicon.ico. It will still work if you declare the full path, but browsers will also keep requesting /favicon.ico and getting a 404. Put it at the root.

Step 3 — Add the HTML to your <head>

Paste this into the <head> section of every page — after the <title> and meta tags. Order matters: the ICO goes first so older browsers, which stop at the first supported entry, pick it up.

<link rel="icon" href="/favicon.ico" sizes="any"> <link rel="icon" href="/favicon-32x32.png" sizes="32x32" type="image/png"> <link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png"> <link rel="apple-touch-icon" href="/apple-touch-icon.png"> <link rel="manifest" href="/site.webmanifest">

A shortcut for the same thing in PHP-based themes and includes:

<?php include $_SERVER['DOCUMENT_ROOT'] . '/favicon-head.html'; ?>

Step 4 — Add the web app manifest

The manifest is what Android and installable web apps read. Create site.webmanifest in your site root:

{ "name": "Your Site Name", "short_name": "YourSite", "icons": [ { "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" } ], "theme_color": "#ffffff", "background_color": "#ffffff", "display": "standalone" }

The theme_color is what Android tints the status bar with once the site is installed, so set it to your brand colour for a coherent look.

Step 5 — Clear the cache and verify

This is the step almost everyone skips, and it is the reason people think their new favicon "did not work". Browsers cache favicons far longer than ordinary page assets.

  1. Hard refresh: Ctrl+Shift+R on Windows or Cmd+Shift+R on macOS.
  2. Check the file directly: open https://yourdomain.com/favicon.ico in a new tab. If it downloads or displays, the file is in the right place.
  3. Try a private window — it ignores the cached favicon.
  4. Purge your CDN cache if you use Cloudflare, Vercel or similar; the icon may be served from the edge.
  5. Wait. Even after a purge, some browsers keep a favicon for hours or until the tab is closed.

CMS quick reference

PlatformWhere to set itAcceptable input
WordPressAppearance → Customize → Site Identity → Site IconSquare image, min 512×512
ShopifyOnline Store → Themes → Customize → Theme settings → FaviconPNG or ICO, 32×32 recommended
WixSettings → Business Info → FaviconPNG, JPG or ICO
SquarespaceDesign → Browser IconPNG or ICO, min 100×100
WebflowProject Settings → General → FaviconPNG or ICO, 32×32
Static HTML / Next.js / AstroFiles in the public or root folder + <link> tagsFull manual control

Why your favicon is still not showing

SymptomLikely causeFix
Generic globe iconFile missing from the site rootMove favicon.ico next to index.html
Old icon persistsBrowser or CDN cacheHard refresh and purge the CDN
Sharp on desktop, blurry on phoneNo 180×180 Apple Touch IconAdd apple-touch-icon.png and declare it
Works on desktop, blank on AndroidNo web app manifestAdd site.webmanifest with 192 and 512 icons
Icon appears on some pages only<link> tags missing from a templateAdd them to the shared layout
White box around the iconSource was a JPG with no transparencyRegenerate from a PNG or SVG source
Icon squashed or letterboxedNon-square source imageCrop to a square master and regenerate

Frequently asked questions

How do I add a favicon to my website?

Put favicon.ico in the root folder of your site, then add <link rel="icon" href="/favicon.ico" sizes="any"> inside the <head> of every page. Add the PNG and Apple Touch Icon links alongside it. Finally, hard-refresh your browser, because favicons are cached aggressively.

Where exactly do favicon files go?

In the root directory of the site — the same folder that holds index.html — so they resolve at https://example.com/favicon.ico. Browsers request /favicon.ico automatically even if you never declare it, which is why the root location is the safest default.

Why is my favicon not showing up?

Almost always caching, or a wrong path. Check in this order: hard-refresh (Ctrl/Cmd+Shift+R), open yourdomain.com/favicon.ico directly to confirm it loads, verify the file is in the site root and not inside an images subfolder, confirm your <link> tags are in the <head> rather than the body, and remember browsers may take hours to refresh a favicon they already cached.

Does the favicon need to be on every page?

Yes. The <link> tags belong in the <head> of every page you want the icon on. On a static site that usually means a shared template or partial; in a CMS it is normally a single site-wide setting.

How do I add a favicon in WordPress?

Appearance → Customize → Site Identity → Site Icon, then upload a square image of at least 512×512. WordPress generates the resized versions and writes the markup for you. Older themes may instead expose the setting under Appearance → Customize → Header.

How do I add a favicon to Shopify, Wix or Squarespace?

Shopify: Online Store → Themes → Customize → Theme settings → Favicon. Wix: Settings → Business Info → Favicon. Squarespace: Design → Browser Icon. All three accept a square PNG, and all three generate the file themselves.

Do I need the site.webmanifest file?

Only if you want an installable web app or a correct Android home-screen icon. The manifest declares the 192×192 and 512×512 icons Android uses. Desktop browsers ignore it, so omitting it does not break your tab icon — it just leaves Android without a proper icon.

Convert your image now

Everything on FaviconPal runs inside your browser — your files are never uploaded to a server. Pick the converter that matches your source file: