# .ico MIME Type: image/vnd.microsoft.icon

> Favicons and Windows icons. Registered as image/vnd.microsoft.icon; image/x-icon is the common alias.

- MIME type: `image/vnd.microsoft.icon`
- Extensions: .ico
- Also seen as: `image/x-icon`
- Content-Type header: `image/vnd.microsoft.icon`
- Compress in transit: yes
- File signature: `00 00 01 00`

## Good to know

- Browsers accept either type for favicons.
- Modern sites can use an SVG or PNG favicon via `<link rel="icon">`, keeping `favicon.ico` at the root for old clients.

## Server configuration

### nginx (inside the types block in mime.types)

```
image/vnd.microsoft.icon ico;
```

### Apache (.htaccess or server config)

```
AddType image/vnd.microsoft.icon .ico
```

### Express

```
res.set("Content-Type", "image/vnd.microsoft.icon");
```

### Python

```
import mimetypes

mimetypes.add_type("image/vnd.microsoft.icon", ".ico")
```

### HTML file input

```
<input type="file" accept=".ico,image/vnd.microsoft.icon">
```

## FAQ

### What is the MIME type for .ico files?

`image/vnd.microsoft.icon`. You may also see `image/x-icon`, but `image/vnd.microsoft.icon` is the one to send.

### What Content-Type header should a .ico file be served with?

`Content-Type: image/vnd.microsoft.icon`. It compresses well, so let the server apply gzip or Brotli.

### How can I tell if a file is really a .ico?

Check its bytes rather than the extension: ICO files start with `00 00 01 00`. On the command line, `file --mime-type name.ico` does this for you.

## Related types

- [.png — image/png](https://www.devkult.com/mime/png.md)
- [.svg — image/svg+xml](https://www.devkult.com/mime/svg.md)

Open the interactive page: https://www.devkult.com/mime/ico