How to Add a Favicon to Your Website: A Step-by-Step Guide


Having a unique favicon (short for “favorite icon”) is essential for branding and making your website stand out in browser tabs. It’s that tiny image you see next to the title of a webpage when you have multiple tabs open. Not only does it enhance user experience, but it also adds a touch of professionalism. Wondering how to get one for your site? Let’s dive right in!

What is a Favicon?

A favicon is a small square image, usually 16x16 pixels, that represents your website. It appears next to your website’s title in browser tabs, bookmarks, and mobile apps. Originally, it was used in Internet Explorer’s favorites (hence the name). Today, it’s a standard feature in all major browsers.

Step 1: Create or Choose Your Favicon Image

Before anything else, you’ll need an image. You can design a unique icon using graphic design software or choose a relevant image that represents your brand.

  • Ensure the image is square. A common size is 16x16 pixels, but 32x32 or even 48x48 pixels work for sharper displays.

  • Save the image in .ico format. There are several online converters available if you have a .png or .jpg image.

You can create your own favicon on

Step 2: Upload the Favicon to Your Website’s Root Directory

Using an FTP client or your web hosting control panel, upload the .ico file to the root directory of your website. This is typically where your website’s main index.html or index.php file resides.

Open your website’s main HTML file (usually index.html or index.php). Between the <head> tags, insert the following line of code:

<link rel="icon" href="favicon.ico" type="image/x-icon">

For example:

  <title>Page Title</title>
  <link rel="icon" href="favicon.ico" type="image/x-icon">

This tells the browser where to find the favicon file.

Step 4: Test It Out!

Clear your browser cache, then visit your website. You should see your favicon displayed next to your site’s title in the browser tab!


Adding a favicon to your website is a simple yet effective way to boost its professionalism and enhance user experience.

With just a few steps, you can set your site apart and make it easily recognizable among a sea of browser tabs.

Happy branding!