Search code examples
iosnginxfavicon

Global favicon.ico and iOS icons


I am looking to set the icons for a domain on an nginx server I have configured. There are many different urls on this domain which will need to display the same favicon / icon no matter what the url.

I am looking for some advice in implementation.


Solution

  • If you would like to have all (sub)domains on a server have the same favicon, you can enter this in the server configuration:

    location ~ /(favicon.ico|apple-touch-icon.png)$ {
        root /var/www/default;
    }
    

    And just place the icons in the above folder.

    Hope that helps, cheers!