Site structure
Version 3.x > Site structure > How can I remove this favicon line of code? View modes: 
User avatar
Member
Member
spire13 - 10/14/2011 6:21:10 AM
   
How can I remove this favicon line of code?
I'm altering the favicon for one site and it's basically all good to go... apart from this line of code:
<link rel="shortcut icon" href="/favicon.ico" />


This line is added automatically within the <head> tag in the background by some Kentico code and I have no access to this particular line through the Master page tab. This line is effectively overwriting my own favicon html (which works!) as it appears later in the page and is consequently replacing my icon with the default Kentico one.

I have read some of the other options on the forum on how to achieve changing the favicon, but for one reason or another, this is the simplest for me - if this one line of code can be deleted then it's done!

So, is there a way to remove this line of code?

User avatar
Member
Member
kentico_michal - 10/16/2011 5:17:43 AM
   
RE:How can I remove this favicon line of code?
Hello,

This code is added to the rendered HTML if there is a favicon.ico file in the root of the web site. So, please try to remove it if there is such a file.

Best regards,
Michla Legen

User avatar
Member
Member
spire13 - 10/17/2011 3:36:51 AM
   
RE:How can I remove this favicon line of code?
Thanks Michla - solved my issue!

User avatar
Member
Member
Mufasa - 11/2/2011 9:57:06 AM
   
RE:How can I remove this favicon line of code?
Note: You must restart Kentico (either through IIS or via the Site Manager->System->General->Restart application for the removal of the favicon.ico to trigger so it won't automatically add the <link ...="/favicon.ico"> tag anymore.

Kentico, in my opinion, you should fix this code so it only adds the automatic <link> tag if one isn't already in the Master page->Head box. Right now it will duplicate the favicon <link> tag and place it's automatic tag last in the <head> so it overwrites the custom one placed there by the web developer.

User avatar
Member
Member
kentico_michal - 11/7/2011 3:16:35 AM
   
RE:How can I remove this favicon line of code?
Hello,

This is currently standard behavior as we do not check if a favicon icon has been defined in master page section. You can also define a favicon diretly in the content tree as a standard document. Even then the physical favicon takes priority so you will need to remove it to display the custom one: How to handle robots.txt and favicons.

Best regards,
Michal Legen

User avatar
Member
Member
Mufasa - 11/8/2011 12:13:59 PM
   
RE:How can I remove this favicon line of code?
If you agree with me on this proposed improvement, or have further comments on improving this feature, vote or comment on the Kentico UserVoice site issue for it: UserVoice: KenticoCMS — Better support for custom favicon