Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

favicon doesn't work

Tags:

html

css

My favicon isn't working properly. It is located in the root of my project. Do I need the absolute path to my icon?

e.g.: "C:/Users/Damian/www/favicon.ico" Or should I type instead:

<LINK REL="SHORTCUT ICON" HREF="favicon.ico" >   

Is that enough? I have cleared my browser's cookies.

like image 597
DRastislav Avatar asked Dec 25 '12 22:12

DRastislav


People also ask

How do I get a favicon to work?

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".

Why is my favicon not showing on Google?

The favicon URL must be stable (don't change the URL frequently). Google won't show any favicon that it deems inappropriate, including pornography or hate symbols (for example, swastikas). If this type of imagery is discovered within a favicon, Google replaces it with a default icon.

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.


1 Answers

If your favicon is in the same directory as the page:

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

Otherwise use this

<link rel="icon" href="your_url/favicon.ico" type="image/x-icon" />
like image 170
Daniel Kurz Avatar answered Oct 19 '22 03:10

Daniel Kurz