how to install a favicon

welcome to part deux of our favicon tutorial. in today’s tutorial, we will be looking at how to install a favicon.

upload the favicon
connect to your server and upload your favicon.ico file to your website. it must be placed in the same directory as your index page. do not put in any other directories, such as the images, leave sitting directly in the root folder. in most cases that would be your public_html folder.

code it
some browsers will look for a direct link in the html source code to your favicon file. add this link to the head section of each page you want your favicon to appear on.

Some browsers will look for a direct link in the HTML source code to your site’s favicon.ico file. You can help these browsers by adding this code link in the head section of each page on which you want the Favicon.ico to appear:

<link rel=”Shortcut Icon” href=”/favicon.ico”>

alternatively you can use this code instead:

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

installing a favicon in wordpress
if you are using a theme that already has a favicon in its main folder, delete it using an ftp client, such as filezilla. upload your new favicon.ico into your current theme’s main folder. to display the favicon in your subscribers’ feedreaders, upload another copy of the file to the main directory of your site (ie: http//domain.com/favicon.ico)

code it for wordpress
open your header.php file and search for the line of code that begins with <link rel=”shortcut icon” and ends with /favicon.ico” />

Overwrite it, if it exists, or add the following code below the <head> HTML tag.

<link rel=”shortcut icon” href=”<?php bloginfo(‘stylesheet_directory’); ?>/favicon.ico” />