Hello i have done a favicon.ico to put in the address bar. Although is shows locally (wampserver) when i put it online the icon doesnt appear. This is what i use:

<link href='<?php echo $base_url; ?>icons/favicon.ico' rel='icon' type='image/x-icon' />
<link href='<?php echo $base_url; ?>icons/favicon.ico' rel='shortcut icon' type='image/x-icon' />

Recommended Answers

All 12 Replies

In HTML5, you don't need type="".
Also, it's recommended to put your favicon in your base directory (/) as browsers automatically call at /favicon.ico — so that might save some headaches.

Best of luck.

i ll try it. thanks

still the same. the icon doesnt appear. Changed the directory but still the same

i am gettings an error: the image can't be shown because it contains errors. Anybody knows why is that?

Member Avatar
<link rel="icon" href="favicon.ico">

Should work. Have you cleared the cache on your browser?

Maybe your .ico file is corrupt. Go to yourdomain.com/favicon.ico and then see what shows up.

Yes it says that it is corrupt. What's wrong with it?


It could be ccorrupted if it is not uploaded properly, copied properly, could be many reasons. I suggest you take the image you want to use as a favicon(i am guessing, you have it in either 16x16 or 32x32).

If not and you have a bigger image you can resize your image using photoshop, If you are not familer with photoshop, i suggest you use: the online editor:

& once you have the image with the favicon sizes i mentioned above:
you can convert the image to a favicon using this site here:

Let us know if you have any issues :)

You probably stopped uploading it half way through. Go remake the favicon and upload it.

its not that. The name used to be logo.ico. When i use yourdomain.com/logo.ico the icon appears as icon but not in the address bar as wanted. If i change the name to favicon the icon doesnt appear either on the yourdomain.com/favicon.ico or the address. It says that it is corrupt

Then I would still re-upload from scratch, as this should fix that.

Maybe in the renaming process your server has a problem and didn't quite finish it or something. Either way, an upload will DEFINATELY reset everything, and solving your problem.

Man that it is so upsetting. i cant believe i am spending hours and still have nt figured it out... i have upload it ten times

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.