favicon.ico throwing 404 TemplateLoader exception This is my first Craft site, I inherited it. I've manually set a link tag to my favicon in my templates/_layouts/_header.twig file:



Everything else in that /dist/img folder renders fine - .png, .jpg, .gif. Everything inside the other /dist subdirs renders fine - /css, /js, /pdf... What am I missing? Going directly to the favicon.ico url, I get a blank page with this:

"Unable to find the template â€œ_layoutâ€."

I do not understand the routing - but that feels like a red herring here anyway. I don't have any routes set up in the cms, and everything else in the /dist directory renders fine when I link directly to it. Thanks for any ideas.
I don't think you can open a .ico file with the browser directly, that's why the request 404s.

There's two ways to make it do its thing:


simply place it in the web root, e.g. public/favicon.ico
use this link tag in your document head: &lt;link rel="icon" href="{{ url('dist/img/favicon.ico') }}" type="image/x-icon"&gt;