# Stop WordPress Serving Its Logo as favicon.ico

> When no Site Icon is set, WordPress answers /favicon.ico with its own logo. This returns a plain 404 instead, so your tab never shows the WordPress logo.

- Type: PHP
- Runs: Run everywhere
- Category: [Disable Features](https://wpide.com/library/category/disable-features/)
- Tags: disable, favicon, branding
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/disable-default-favicon/

## Code

```php
add_action( 'do_faviconico', function () {
    if ( ! has_site_icon() ) {
        status_header( 404 );
        nocache_headers();
        exit;
    }
}, 1 );
```

## Notes

If a real favicon.ico file exists in the site root, your web server serves it before WordPress is involved.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Stop WordPress Serving Its Logo as favicon.ico" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
