Articles · Website basics
How to add a favicon to your website
By Armstrong Websites. Published . Updated .
To add a favicon to your website, make a square image of your logo mark, save it as a PNG at 512 by 512 pixels, and upload it in your site’s settings under Favicon, Site icon, or Browser icon. If your site is hand-coded, save the file as favicon.ico in your site’s root folder and add one line of code to your page head. Then reload the page to check the tab.
A favicon is the tiny icon that shows in a browser tab. It also appears in bookmarks and browser history. Google can show it beside your listing in search results too. Visitors with ten tabs open use it to find your site again.
This guide covers what to design, what files to make, where to put them, and how to check the result.
Pick an image that works at a tiny size
A favicon displays at about 16 by 16 pixels in a tab. A full logo with a business name in small letters turns into a smudge at that size.
Use one simple shape instead. A single letter, a symbol from your logo, or a bold block of color all work. Keep the shape centered and the contrast high. A dark icon on a transparent background can vanish in a dark browser theme, so give the icon a solid background color or pick a color that reads on both light and dark.
If you do not have a logo file yet, start there. How to get a logo file your website can use explains which formats to ask for.
Make the files
Start with a square image. A square of 512 by 512 pixels gives you room to scale down. Save it as a PNG.
Most sites need up to three files.
A favicon.ico file. This is the oldest format, and browsers still look for it by default at the root of your site, at yoursite.ca/favicon.ico. Many free favicon generators turn a PNG into an ICO file.
A PNG or SVG icon. Modern browsers accept both. Google’s guidelines say the favicon must be a square, and that its size must be a multiple of 48 pixels, such as 48 by 48 or 96 by 96. A 48 by 48 PNG covers this. An SVG scales to any size and stays sharp.
An Apple touch icon. This is a 180 by 180 pixel PNG. iPhones and iPads use it when someone adds your site to their home screen. Name it apple-touch-icon.png. Fill the whole square with color, because Apple rounds the corners itself.
A free favicon generator can produce all three from one image. Check each result at small size before you upload it.
Upload the favicon
Where you upload depends on how your site is built.
Website builders. Open your site settings and look for a field named Favicon, Site icon, or Browser icon. Upload your PNG there and save. The builder handles the rest. Labels vary, so check the builder’s help pages if you cannot find it.
WordPress. Go to Appearance, then Customize, then Site Identity. Click Select site icon and upload a square image of at least 512 by 512 pixels. Click Publish. Some themes put this setting in a different menu, but the label stays Site Icon.
A hand-coded site. Upload your files to the root folder of your site. Then add these lines inside the head section of every page:
<link rel="icon" href="/favicon.ico" sizes="48x48">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
If you only made an ICO file, keep the first line and skip the second. If your site uses a template shared by every page, add the lines once in that template. What is a content management system and do you need one? explains why shared templates save this kind of work.
A site built by a designer. Send the files and ask them to add the icon. It takes a few minutes.
Check that it works
Open your site in a new tab. Look at the tab title. Your icon should sit to the left of it.
Browsers store favicons in a cache, so an old icon can stay on screen after you change it. Close the tab and open a new one. If the old icon still shows, hold Shift while you click reload, or open the site in a private window. A private window skips most stored data.
Then check a phone. Open your site on an iPhone and an Android phone, and bookmark it. How to test your website on a phone lists other checks worth running at the same time.
Help Google find your favicon
Google picks up your favicon when it crawls your site. A few rules help.
- Keep the icon file at a web address that does not change.
- Do not block the icon file in your robots.txt file.
- Use the same icon address on every page, not a different one per page.
- Make sure the image is one Google would approve of for your business. Google can swap out icons it finds inappropriate.
Google does not update favicons on a schedule. A new icon can take days or longer to show in search results. If it still shows the old one after a few weeks, check that your homepage links to the new file. Request a fresh crawl of your homepage in Google Search Console. How to set up Google Search Console for your website shows how to get started.
Fix common favicon problems
A gray globe or blank page icon shows. The browser cannot find a file. Check that favicon.ico sits in the root folder and that the file name is spelled right.
The icon looks blurry. The source image was too small, or it had too much detail. Start over with a 512 by 512 pixel square and a simpler shape.
The icon has a white box around it. The PNG has no transparent background, or the transparency did not survive the conversion. Export again with a transparent background, or fill the square with a solid color on purpose.
The old icon will not go away. This is almost always the cache. Try a private window first. Then wait.
The icon shows in the tab but not on the home screen. You are missing the Apple touch icon. Add the 180 by 180 PNG and the link line above.
Add the favicon to your launch checklist for any new site. What to check before your new website goes live lists the other small items that often get missed.
If you want help adding one, send a message through the contact page.
Read next
What is a staging site and does your website need one?
A staging site is a private copy of your website for testing changes. Learn when a small business needs one, how it works, and what to check before you publish.
How to add a request a quote form to your website
A quote form collects the details you need to price a job. Learn which questions to ask, how many fields to use, where to place the form, and how to reply fast.
How to add a careers page to your website
A careers page helps you find staff without paying a job board. Learn what to post, how to list pay, how to collect applications, and what to show when you are not hiring.