I'd like to add my site's favicon to the admin part of the site.

I tried to do this using the "Site icon" option under general settings. That adds the icon to the sidebar but not as a favicon.

The only way I've found that works so far is by editing the CP's base layout template and adding it there, but that's obviously a bad idea, as that will get overwritten on update.

Anyone found another way to fix this?

2 Answers 2


If you have a favicon.ico at the base level of your public site I think that should do it. All I can tell you is that this is what works for me.

  • Didn't work for me =/ Commented Jul 21, 2019 at 21:40

If you're on Craft 3.5+, you can use the cpHeadTags config settings to achieve this.

'cpHeadTags' => [
    // Traditional favicon
    ['link', ['rel' => 'icon', 'href' => '/icons/favicon.ico']],
    // Scalable favicon for browsers that support them
    ['link', ['rel' => 'icon', 'type' => 'image/svg+xml', 'sizes' => 'any', 'href' => '/icons/favicon.svg']],
    // Touch icon for mobile devices
    ['link', ['rel' => 'apple-touch-icon', 'sizes' => '180x180', 'href' => '/icons/touch-icon.svg']],
    // Pinned tab icon for Safari
    ['link', ['rel' => 'mask-icon', 'href' => '/icons/mask-icon.svg', 'color' => '#663399']],

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.