All Articles

How to Set a Favicon for Your Website: Complete HTML Tag Tutorial

March 2026 ~7 min read How-To

A favicon is the small icon displayed in browser tabs, bookmarks bars, and search results. Though only 16×16 pixels in size, it is an important element for building your website's brand recognition. This guide walks you through the complete process from creation to setup, with the best browser-compatible approach for modern development.

Why Favicons Matter

Many people overlook the importance of a favicon, but it has a real impact on user experience:

Step 1: Prepare Your Icon Assets

Before setting up your favicon, you need a few icon sizes ready. Recommended checklist:

Quick start: If you only need a basic favicon, create a 32×32 ICO file with our tool and place it in your website root directory. That alone will make most browsers show your favicon.

Step 2: Create Your ICO File

1

Prepare a high-resolution source image

Use a PNG image of at least 256×256 pixels as your source. Make sure the image has a transparent background if your logo needs one, so the ICO icon will display correctly on any background color.

2

Convert using the ICO Generator

Go to our ICO Icon Generator, upload your image, select 32×32, and download the ICO file. If you need an ICO containing both 16×16 and 32×32, download each size separately and combine them with an ICO merge tool.

3

Upload the file to your website root directory

Upload the downloaded favicon.ico to your website's root directory (i.e., https://yourdomain.com/favicon.ico). Most browsers will automatically try to load from this path even without an HTML declaration.

Step 3: Set Favicon Tags in HTML

The following is the recommended complete favicon HTML setup for modern web development, covering all browsers and devices:

Minimal Setup

<!-- Place inside the <head> tag --> <link rel="icon" type="image/x-icon" href="/favicon.ico">

Standard Recommended Setup

<!-- ICO Favicon (backwards compatible, all browsers) --> <link rel="icon" href="/favicon.ico" sizes="32x32"> <!-- PNG Favicon (modern browsers) --> <link rel="icon" type="image/png" href="/icon-32.png" sizes="32x32"> <link rel="icon" type="image/png" href="/icon-16.png" sizes="16x16"> <!-- Apple Touch Icon (iOS / iPadOS home screen icon) --> <link rel="apple-touch-icon" href="/apple-icon.png">

Complete Modern Setup (with SVG and PWA)

<!-- ICO Favicon (backwards compatible) --> <link rel="icon" href="/favicon.ico" sizes="48x48"> <!-- SVG Favicon (modern browsers, supports dark mode) --> <link rel="icon" href="/icon.svg" type="image/svg+xml"> <!-- Apple Touch Icon (180×180 PNG) --> <link rel="apple-touch-icon" href="/apple-icon.png"> <!-- Web App Manifest (PWA settings) --> <link rel="manifest" href="/manifest.webmanifest"> <!-- Browser theme color (Android Chrome toolbar) --> <meta name="theme-color" content="#667eea">

Step 4: Set Up the Web App Manifest (PWA)

If you want users to be able to add your site to their home screen, you need to create a manifest.webmanifest file:

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

Browser Favicon Support

Browser ICO PNG SVG Apple Touch Icon
Google Chrome Full support Full support Full support (ignored on non-Apple devices)
Mozilla Firefox Full support Full support Full support (ignored on non-Apple devices)
Apple Safari Full support Full support Partial support Full support
Microsoft Edge Full support Full support Full support (ignored on non-Apple devices)
iOS Safari Full support Full support Partial support Used for home screen icon

Common Issues & Troubleshooting

Why does my browser still show the old favicon after an update?

This is a browser cache issue. Solutions:

Why doesn't my favicon appear in the bookmarks bar?

Check the following:

My favicon looks blurry or distorted — what can I do?

This is usually caused by insufficient source image resolution or a non-square aspect ratio. Recommendations:

Note: Some web frameworks (such as Next.js, Nuxt.js) have their own favicon configuration methods. Refer to the official documentation for each framework rather than adding tags manually in HTML.

Testing Your Favicon Setup

After completing the setup, verify your favicon displays correctly using these methods:

  1. Open https://yourdomain.com/favicon.ico directly in the browser to confirm the icon loads
  2. Check whether the browser tab shows the icon
  3. Bookmark the page and confirm the bookmarks bar shows the correct icon
  4. Use Google Search Console to check if the favicon can be crawled correctly
  5. Use a tool like RealFaviconGenerator for comprehensive testing

Now that you have everything you need to set up your favicon correctly, go ahead and create your ICO icon!

Create Your ICO Favicon Now