A favicon is the little image displayed at the left edge of the address bar in most browsers, or on the tab. Adding a Favicon is a nice way to enhance your website and give it a finished look. ![]()
![]()
Adding a favicon to your website is very easy. First you need to create a 16 by 16 pixel icon and name it favicon.ico. No other file format or size will do. Save your favicon to the root directory of your ASP.Net web application:![]()
In some older browsers (e.g., Internet Explorer 5), that's all it takes. For the latest versions of Firefox, Internet Explorer and Chrome, however, you need to add two links to your favicon to the head in your HTML. If you are using a master page, the same two links would go in the head on the master page.:
<head runat="server">
<title>My Website</title>
<link runat="server" rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link runat="server" rel="icon" href="favicon.ico" type="image/ico"/>
</head>
The reason you have two links to the same favicon is to make sure your favicon works with most browsers. Some, such as Firefox, will work with either link. Internet Explorer versions 6 and 7 are especially picky. If you use both links, however, one is bound to work in almost any browser.
That's all there is to it.
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Manav PandyaPosted Feb 6, 2017, 12:52 AM
I want article that show how to do that using Database
Manav PandyaPosted Feb 6, 2017, 12:52 AM
Its almost easy one to set fevicon
Andrew FensterPosted Feb 17, 2016, 10:11 AM
Just a followup six years later. If you're doing ASP.Net MVC, you can add this to the <head> section of your layout: <link rel="icon" href= "@Url.Content("~/content/favicon.ico")" />
Former memberPosted Jun 25, 2012, 8:04 PM
Nice article. Thanks for posting it. There may be lots of other places that address this issue but yours is clear and to the point and therefore very helpful. cheers
viral dalwadiPosted Feb 8, 2010, 9:05 AM
Really nice thing,,,liked it...
TarikPosted Feb 4, 2010, 11:47 PM
One can google it, there a lot of articles about favicon in asp.net. Thanks but you should come up with something creative to help people :)