Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Favicon to Website [duplicate]

Tags:

html

favicon

Possible Duplicate:
HTML Title Image

Can someone please tell me how to make icons appear on browser tabs in PHP?

I want my icon to appear on the tabs when my site is being accessed.

like image 661
osg Avatar asked Aug 09 '12 23:08

osg


People also ask

How can I add favicon in my website?

To add a favicon to your website, either save your favicon image to the root directory of your webserver, or create a folder in the root directory called images, and save your favicon image in this folder. A common name for a favicon image is "favicon. ico".

Does favicon affect SEO?

There are no direct SEO or ranking effects of having favicons. However, there are indirect benefits for your pages' SEO: Increased Usability Of Site: Usability of a site correlates to higher search engine ranking.

Can you use PNG for favicon?

A favicon can actually be either a PNG, GIF, or ICO file. However, ICO files are typically used more than others as the file size is smaller and it is supported in all major browsers. PNGs are used more commonly for IOS, Android, and Windows 10 devices.


2 Answers

Simply put a file named favicon.ico in the webroot.

If you want to know more, please start reading:

  • Favicon on Wikipedia
  • Favicon Generator
  • How to add a Favicon by W3C (from 2005 though)
like image 25
kapa Avatar answered Oct 05 '22 02:10

kapa


  1. This is not done in PHP. It's part of the <head> tags in a HTML page.
  2. That icon is called a favicon. According to Wikipedia:

    A favicon (short for favorites icon), also known as a shortcut icon, website icon, URL icon, or bookmark icon is a 16×16 or 32×32 pixel square icon associated with a particular website or webpage.

  3. Adding it is easy. Just add an .ico image file that is either 16x16 pixels or 32x32 pixels. Then, in the web pages, add <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> to the <head> element.
  4. You can easily generate favicons here.
like image 131
citruspi Avatar answered Oct 05 '22 01:10

citruspi