Favicon.ico not found

From my newly created jekyll web site I get the message:

[2019-02-01 10:16:01] ERROR `/favicon.ico' not found.

When I load a page different from the home page.
The file favicon.ico is in my home director.

are you specifying the location in your head section?

<link rel="shortcut icon" href="/favicon.ico">

are you get that error out on the internet or locally?

In which file should I put this directive ?

Hello Couet,
in your head part
<link rel="shortcut icon" href="{{ "/favicon.ico" | prepend: site.baseurl | prepend: site.url }}" />


1 Like

It should be in the <head> of your pages… so ideally in your layout or added as an _include.

If you’re testing locally with jekyll serve and see this error in the log it’s usually a false positive. Most browsers try to request /favicon.ico regardless if you have one or not so you can likely ignore it.

If you are looking at the production site and open your browser’s web development tools console and see the error, then you likely have the path incorrect. Which is what @rdyar is getting at.