Can you help please, I searched for this on google but I can't find a solution, How can I remove the drupal 8 favicon, i tried the theme sitting and global sitting but it's not changing anything because I have to put another link if I want to replace it with my own, But I don't want to replace it I want to remove it.

Thanks

Comments

pixelsweatshop’s picture

Just drop your custom favicon in your site root. That's where browsers look first. Also make sure you flush your browser cache (you may have to do it several times and browsers seem to not to really care about refreshing fa icons very often). Many times I use a different browser, that hasn't been used on the site yet and it shows the new one there. 

DrupalUser17’s picture

Thanks, But How can I get to the site root?

pixelsweatshop’s picture

However you uploaded the Drupal files in the first place. FTP, ssh or your hosts file browser. Put it in the public file directory

DrupalUser17’s picture

I am not sure where it is, I am new to drupal, I have uploaded drupal from cpanel to the main directory, but I can't find the folder that contain the favicon, Can you please tell me where can i find it. Thanks

pixelsweatshop’s picture

Put it in the main directory. 

DrupalUser17’s picture

To put it in the main directory I have to find it, I can't find it.

pixelsweatshop’s picture

You said you put Drupal in the main directory-put it there as well. Put it is the same one where you see core, sites etc.

You are using Cpanel so it will be the public_html directory

DrupalUser17’s picture

So you're telling me to put my own, But my main question was how to remove it completely I don't want to have favicon in my website.

ressa’s picture

I put my new favicon in the theme folder, that usually works.

DrupalUser17’s picture

I want to remove the favicon it completely and not to replace it with anything.

ressa’s picture

Well, then I would try deleting it.

DrupalUser17’s picture

Yes, But where is it, I tried to find it from the cpanel but I couldn't.

ressa’s picture

Usually you can find it in the theme folder, it depends on which theme you are using. If you use Bootstrap theme, it'll be under themes/bootstrap.

DrupalUser17’s picture

I am using "Bartik" custom theme, and can't find it there.

ressa’s picture

Create an empty favicon.ico file in the folder core/themes/bartik, and check the page in a fresh browser.

Silverngold’s picture

You have cpanel. You need to learn your file manager. It is under public html.

DrupalUser17’s picture

Yes I am looking there but can't find it.

DrupalUser17’s picture

I did that it's still showing in the home page.

tribalpixel’s picture

/**
 * Implements hook_page_attachments_alter().
 */
function YOURTHEMENAME_page_attachments_alter(array &$page) {

  // Remove Drupal default favicon link in <head> 
  unset($page['#attached']['html_head_link'][0]);
 
}

works for me, in drupal 8.4.4

just check that the favicon is in index [0] ;)