.ico MIME type
ICO iconimages
image/vnd.microsoft.iconFavicons 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 | image/vnd.microsoft.icon |
| Compress in transit? | Yes — enable gzip or Brotli |
| 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">, keepingfavicon.icoat the root for old clients.
Serve .ico files with the right type
The response header to send:
Content-Type: image/vnd.microsoft.icon
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
image/vnd.microsoft.icon ico;
AddType image/vnd.microsoft.icon .ico
res.set("Content-Type", "image/vnd.microsoft.icon");import mimetypes
mimetypes.add_type("image/vnd.microsoft.icon", ".ico")<input type="file" accept=".ico,image/vnd.microsoft.icon">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.ico | grep -i '^content-type:' file --mime-type file.ico
Frequently asked questions
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.
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options