Hugo Favicon not showing up on Netlify

hey guys, I’m using Hugo to build my websites and have successfully deployed it on Netlify but it’s not showing up on my favicon. When I run it on locally it works fine but not on Netlify.

The favicon is placed in the /static folder as “computer.ico” and I’ve put favicon = “/computer.ico”
under params in the config.toml file.

Hi @richgang

Can you provide the name of your site so that others can assist you.

You could use a tool like Favicon checker to get more information (could be caching of your browser.)

Also, browsers look for favicon.ico as the default name of the file. If you intend to use a different one, you need to add the HTML to the <head> yourself.

I had. this issue, but I did not use Hugo, I can see many others also had the same issue using other platforms. I believe the issue is that the directory that the favicon is in does not get into Netlify properly so the file doesn’t actually exist in the location its supposed to when Netlify deploys it.

The solution is to host the file elsewhere on your own server or image host and make all of your code files refer to the direct url of that external host

That should solve the issue

1 Like

What has been proposed by @QaunainM is “a solution”, but is certainly not what I would argue is “the most correct solution”.

Before anyone attempts it, they should read my response here: