DIY website updates · Browser icons

How to Add or Replace a Favicon on a Static Website

A favicon is the small mark beside a page title in a browser tab. Here is how to replace it without confusing it with your header logo or social sharing image.

Update the icon file and the page’s icon declaration, publish both, and verify the public file before troubleshooting the browser cache. Check nested pages as well as the homepage.

Identify the icon you want to change

A browser tab icon, a logo inside your page, and an image in a shared link are separate assets. Changing the header logo alone may leave the browser icon untouched. Check which one is outdated before editing your files. For a link card, use the social share image guide.

This walkthrough is for a static HTML site that you can edit and deploy. If you use a site builder, first find its favicon setting and check its accepted formats. You will still need to verify the published result.

Prepare a mark that works at a tiny size

Use a simplified symbol or one clear letterform rather than a full business name squeezed into a square. Preview it small on both a light and a dark background. Fine lines and extra whitespace can make a good large logo hard to recognize in a tab.

Keep your editable original and export the intended web version. A PNG is a straightforward raster option; SVG is useful for a scalable mark when supported by your target browsers. Do not rename a file extension to convert the format. Ask for an export if you only have a document or a screenshot. The business logo files checklist explains which source files to keep.

Find the current icon declarations

Open the HTML for your homepage and look in its <head> for rel="icon". Record the referenced file path. Then inspect a service page and an article. Some sites use one shared layout; others repeat the head markup in every HTML file.

Check for additional icon declarations before adding another. Browsers can choose between declared icons using their format, size, and other attributes. An older second declaration may explain inconsistent results. A web app manifest or Apple touch icon is a separate surface; review those only if you also intend to change saved home-screen icons.

Add the file and update the HTML together

For a simple PNG example, export an actual 32 by 32 pixel square and save it at a public path such as /assets/brand/site-icon-v2.png. The filename is an example, not a file to paste into your own site without creating it.

<link rel="icon" type="image/png" sizes="32x32"
      href="/assets/brand/site-icon-v2.png">

Put the declaration inside the head. Match the type and sizes to the file you actually exported. For SVG, use type="image/svg+xml" and an SVG file. Keep a suitable fallback if your audience needs browsers that do not support your preferred format. MDN documents icon link selection and the HTML link element.

A leading slash starts at the domain root, so the same path can work on nested pages. A relative path such as favicon.png instead resolves from the current page location. Check letter case and directory names against your repository.

Publish and check the actual public files

Commit the new icon and affected HTML together, then wait for the production deployment to succeed. Open the public icon URL directly. It should display an image without asking you to sign in. A missing file or an HTML error page at that address needs fixing before any cache troubleshooting.

View the public homepage source and one nested page source. Confirm both reference the intended file. In browser developer tools, check the icon request if it remains unclear which file is loading. Verify the production domain rather than only a preview deployment.

Separate a stale tab from an incomplete release

Close the old tab and open a fresh one after the public HTML and file are correct. Browsers may retain old icons independently of a normal page refresh. A new descriptive filename can help distinguish the replacement from the old file, but every page using it must reference that filename.

If production still serves old HTML, follow the website cache checklist. Avoid repeatedly clearing unrelated production settings. First establish which release and URL you are checking. A successful browser update also does not promise an immediate change to Google's search-result icon.

Keep a short update record

Save the final file path, format, pages updated, and deployment result with your website notes. If someone else maintains the site, send the public page URL, the approved brand file, and a screenshot showing where the old icon appears. Agree on whether the work includes browser tabs only or also saved home-screen assets.

If you are learning the complete static-site workflow, the BUILD • PUBLISH • OWN IT guide offers the broader DIY publishing path. For ongoing updates, explore website management.

Need help with a business website update?

Share your website URL, approved icon file, and where the old mark appears so we can review the scope.