Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does my favicon not show up?

Tags:

html

favicon

The following is used to set the favicon in my html code:

<link rel="icon" type="img/ico" href="img/favicon.ico"> 

However, the icon does not show. Why?

Note:

I have confirmed that the file is on-disk at the correct path.

like image 845
Sivajith Avatar asked Mar 16 '13 08:03

Sivajith


People also ask

How long does it take for a favicon to show up?

For the most part it seems like most SEOs said it takes around 24 hours, sometimes less. The guidelines specifically say "Google will look for and update your favicon whenever it crawls your home page.

How do I make my favicon appear?

To add a favicon to your website, either save your favicon image to the root directory of your webserver, or create a folder in the root directory called images, and save your favicon image in this folder. A common name for a favicon image is "favicon.ico".

How do I fix my favicon?

Resetting the page or clearing the cache on your site or browser may be sufficient to fix the issue. If that doesn't work, try other options. Different graphic formats are used to create a favicon, but some of them are not supported by all browsers and their versions. In this case, it is recommended to use .


1 Answers

  1. Is it really a .ico, or is it just named ".ico"?
  2. What browser are you testing in?

The absolutely easiest way to have a favicon is to place an icon called "favicon.ico" in the root folder. That just works everywhere, no code needed at all.

If you must have it in a subdirectory, use:

<link rel="shortcut icon" href="/img/favicon.ico" /> 

Note the / before img to ensure it is anchored to the root folder.

like image 106
Rich Bradshaw Avatar answered Nov 08 '22 21:11

Rich Bradshaw