How to add a favicon.ico to a PHP website?
- Login into your cPanel.
- Go to the File Manager, Select your directory for your site (In this case the main domain public_html location) and Click Go.
- Upload the favicon to your server.
- Edit the source code that contains the <head> code of your site. The head section code should look similar to the snapshot to the right.
- Add the following line of code below the <title> tag.
<link rel='shortcut icon' href='favicon.ico' type='image/x-icon' />
- Save the file and preview your site in your browser. You should see the favicon show in your browser.