Favicon works on localhost but not on a server?

Viewed 1753

I'm currently trying to figure out why my favicon isn't showing up. It works fine on my localhost but when I go to upload it to Netlify, it doesn't show up.

My favicon

My website

I am using React and then deploying it to a Netlify server. Not sure if that has something to do with it. Here's what I put in my index.html file in the public folder.

<link rel=”icon” href=”%PUBLIC_URL%/favicon.ico”>

And like I've already mentioned, it does work and show up with my localhost:3000. Any ideas on what I might be doing wrong?

2 Answers

You should remove these extra quotation marks: <link rel="”icon”" href="”/favicon.ico”">.

I had the same issue and how many suggested in the comments, the problem was indeed in cache. So you can mark this as the answer for the future readers.

Related