What Is a Favicon and How to Add One to Your Website
Your website looks finished, but in the browser tab it still shows a blank grey page icon, or worse, the logo of the website builder you used.
Your website looks finished, but in the browser tab it still shows a blank grey page icon, or worse, the logo of the website builder you used. If you have been wondering what is a favicon and why yours is missing, the answer is a tiny image file that most small sites forget, and it takes about 20 minutes to set up properly.
This guide explains what a favicon does, which sizes you actually need, how to add one to the most common types of website, and why it can take days for search results to show it.
What is a favicon and where does it appear
A favicon, short for "favourite icon", is the small square image a browser shows next to your page title. It started in the late 1990s as the icon that appeared beside saved bookmarks, which browsers then called favourites.
Today it shows up in far more places:
- Browser tabs on desktop and mobile
- Bookmarks and the browser history list
- Mobile search results, beside your site name
- The home screen, when someone saves your site to their phone
- Some messaging apps and link previews
Because it appears in search results, a favicon is now part of how people recognise your site among ten other links. A clear, distinctive icon helps returning visitors spot you quickly.
The favicon sizes you actually need
You will find lists online recommending 20 or more favicon files. For a small website, four is plenty.
| File | Size | Used for |
|---|---|---|
| favicon.ico | 32 x 32 px (can include 16 x 16) | Older browsers and the default request to /favicon.ico |
| icon.svg | Scalable | Modern browsers, sharp at any size |
| apple-touch-icon.png | 180 x 180 px | iPhone and iPad home screens |
| icon-512.png | 512 x 512 px | Android home screens and web app manifests |
Search engines generally want a favicon that is a multiple of 48 px square, so a 512 px PNG or an SVG covers that. Keep each file small. A favicon over 10 to 20 KB is usually carrying detail that will never be visible at 16 pixels.
Designing a favicon that works at tiny sizes
The biggest mistake is shrinking a full logo into a 32 px square. Wordmarks and detailed illustrations turn into an unreadable smudge.
- Use one letter or one simple shape. The first letter of your brand, in your main colour, is often enough.
- Use strong contrast. Light grey on white disappears in a light browser theme. Test against both white and dark backgrounds.
- Fill the square. Leave only a small margin so the icon is not lost in the tab.
- Check it at 16 px. Zoom your design out to actual size before exporting. If you cannot tell what it is, simplify.
If you have not settled on brand colours yet, our guide on choosing a colour palette for a website helps you pick one that also works at icon size.
How to add a favicon to your website
On a hand-coded or static site
- Upload your files to the root folder of your website, the same folder as your home page.
- In the head section of every page, or your shared template, add one link tag with rel set to "icon" pointing to /favicon.ico with sizes "32x32".
- Add a second icon link pointing to /icon.svg with the type "image/svg+xml".
- Add a third link with rel set to "apple-touch-icon" pointing to /apple-touch-icon.png.
- Save, upload the template and reload a page in a private window to check the tab.
Keeping favicon.ico in the root also matters on its own, because many browsers and tools request that exact path even if you never link it.
On WordPress
Go to Appearance, then Customise, then Site Identity, and upload a square image of at least 512 x 512 px as the Site Icon. WordPress generates the other sizes and adds the tags for you. If you are still deciding how your site should be built, our explainer on what a CMS is and when a site needs one covers the trade-offs.
On hosted website builders
Most builders have a favicon or site icon option in the general or SEO settings. Look for "favicon", "site icon" or "browser icon". Some only allow custom favicons on paid plans, so check before you design one. Upload the largest square version you have, ideally 512 x 512 px, and let the builder scale it down. If the builder only accepts a single small file, upload a 48 x 48 px PNG rather than a 16 px one, because it will still look crisp in mobile search results.
Why I would not bother with a favicon generator's full pack
Online favicon generators are handy, and many guides tell you to paste in every file and tag they produce. The result is often 15 image files and a dozen lines of code in your page head, including tile images for platforms that have barely been used for years.
That extra code is not dangerous, but it adds clutter you will need to maintain. Every time you change your logo, you need to regenerate and re-upload the whole set, and it is easy to miss one, leaving an old icon on some devices. For a small site, the four files in the table above cover every browser and phone your visitors are realistically using. Use a generator to create those four, then ignore the rest.
Why your favicon is not showing yet
If you have added a favicon and still see the old one, it is usually caching rather than a mistake.
- Browser cache: browsers hold favicons longer than almost anything else. Open your site in a private window to check whether the new one is live.
- Search results: search engines recrawl your favicon on their own schedule. It can take days or several weeks to update in results.
- Wrong path: open the icon address directly in your browser. If you get a 404 error, the file is in the wrong folder.
- Blocked file: make sure your robots.txt file does not block the folder where the icon lives.
If you recently enabled HTTPS, also make sure the icon loads over a secure address. Mixed content can stop the icon appearing. Our guide to fixing mixed content warnings covers that problem.
Frequently asked questions
What size should a favicon be?
Provide a 32 x 32 px favicon.ico for older browsers, an SVG for modern ones, a 180 x 180 px PNG for Apple devices and a 512 x 512 px PNG for Android. For search results, a square image that is a multiple of 48 px works best. Keep each file small.
Does a favicon help SEO?
A favicon does not directly improve rankings. It does appear next to your site in mobile search results, so a clear icon can make your listing easier to recognise and click. That can help returning visitors find you faster.
Why is my favicon not showing in Google?
Search engines update favicons on their own schedule, so a new icon can take days or weeks to appear. Check that the file is reachable, square, linked in your page head and not blocked by robots.txt. Once those are correct, it is a matter of waiting for a recrawl.
More in Web Basics
Web Basics
What Website Bandwidth Limits Actually Mean for You
Your host emails to say you have used 82 percent of your monthly bandwidth, and it is only the 14th.
Web Basics
What HTTP Status Codes Mean and Which Ones Matter
A reader emailed me in September because his hosting support had replied to a ticket with the sentence "the origin is returning...
Web Basics
What Is a CDN and Does Your Small Website Need One
Your site loads quickly when you test it at home, but a visitor on the other side of the world says it takes four or five...