0

Any idea why this isn't working?

<link rel="icon" type="image/png" href="Favicon.png"/>

It's just not showing up. I used the exact same setup on a local practice website, and it worked fine (it was using the same picture as well). Are you supposed to just put the picture onto your website server and reference it like I did? Or is there something I don't know about?

Also, how exactly do you get a favicon to show up on IE? Yes, I've researched this, and all the methods I've found just don't work...

Tommay
  • 1,567
  • 4
  • 15
  • 16

3 Answers3

1

You can just put the icon [favicon.ico] in the root directory of your website. That's what I did. Oh yeah, to answer the question, it could be because it is a png ;)
There is a PNG to ICO file converter online, so that's what I used to get around the IE issue. www.convertico.com
*If you test this locally, it might not show up. My local pages don't show a favicon.

  • I believe it's already in the root directory... Root directory is the file with the website name on it right (I'm pretty new to this world...)? With the homepage HTML file in it? – Tommay Nov 27 '14 at 02:37
  • Yeah, containing the index.html file. Try converting to ICO. And I wouldn't have a capital in your filename, it's asking for trouble. Because while Windows doesn't see a difference, UNIX (and Mac) does, and many servers are UNIX. – Kent Slaughter Nov 27 '14 at 02:54
  • Yeah, I knew that was against convention but I didn't know it would actually effect anything. It's now favicon.ico... still doesn't work though. – Tommay Nov 27 '14 at 03:00
  • Who is your provider? I think if they don't support that it might not be enabled, so we might have to make it work with the meta, which I haven't done... If you know a page on the same server, can you try to see how they did it? – Kent Slaughter Nov 27 '14 at 03:05
  • Dreamhost. I'm pretty sure they support it, because they had a file named favicon on the server when I launched it. Not sure exactly what it was... but it's gone now... – Tommay Nov 27 '14 at 03:33
  • Um, have you removed the meta tag from your html? It shouldn't make any difference though. Oh look at what a dreamhost search comes up with: http://wiki.dreamhost.com/index.php?title=Special%3ASearch&search=favicon&go=Go actually don't bother, it's server stuff... Don't know why it's there but it's not helpful – Kent Slaughter Nov 27 '14 at 04:27
  • Maybe dreamhost's support crew can help. Good luck! – Kent Slaughter Nov 27 '14 at 04:52
0

Yes, you should upload the file to your web server. The reason why this works locally for you is because it is in the same file as your html document. There are two things you do to get your favicon working:

  1. Upload the file to the same folder as in your html document. If you have a web host, such as altervista.org, you could upload your favicon to the website.

  2. Upload your favicon to an image uploading website. You could use google drive for all it's worth, anything website that can publicly display your photos is fine. If you upload this to a server, you can find the link to your image and reference that favicon in your link tag.

Hopefully this helps!

Adam Howard
  • 400
  • 3
  • 11
  • Yes, the file is already in the same folder on the server as my index.html. It's also a .ico. Any ideas? – Tommay Nov 27 '14 at 03:34
  • From what I know you do not necessarily have to list what type of file the favicon is. You can try changing your tag to look like this: . This is supported by all major browsers and there is a good chance that this could work. – Adam Howard Nov 27 '14 at 03:38
  • Nope. Good guess though, cause I just realized we'd been using type="image/png" the whole time. How hard can this be? Is there anything in the surrounding code that could be interfering? – Tommay Nov 27 '14 at 03:49
  • I think the really strange thing about this is that it worked fine when you tested your file offline. One key thing is to make sure that the file name is spelled the same way in the code as it is in the folder, because a capital letter could throw the code off. Could you possibly provide a link to the website where are you experiencing this issue? – Adam Howard Nov 27 '14 at 03:52
  • I just cleared my image/file cache... didn't help. The REALLY weird thing is that it works fine on Firefox, but not Chrome or IE. – Tommay Nov 27 '14 at 04:01
  • Is your favicon supposed to be "[K]"? If it is, then it displayed properly for me in Google Chrome and Internet Explorer. – Adam Howard Nov 27 '14 at 04:14
  • Yes, it is [K]. Huh. I tried everything out on my other computer as well. Same story, only worked on Firefox. Problem with my internet, perhaps? – Tommay Nov 27 '14 at 04:24
  • That's always a possibility, and maybe your connection actually is the issue. After going to the website on my phone, the favicon once again displayed properly. You could always try emailing people in your contacts and ask them if they can see your favicon when they visit your site. That way you could determine whether it is a widespread issue or if it is a problem specific to you. – Adam Howard Nov 27 '14 at 04:35
0

I faced to the same problem.After checking my whole code for hours , finally I figured out the problem.I used base tag , it caused the favicon icon to do not be displayed.When I removed , the problem was solved.So, I recommend you to remove base tag if you have used in your website.

I hope it could help!