devkult_
tools29converters34
home/mime/.ico

.ico MIME type

ICO iconimages

image/vnd.microsoft.icon

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

MIME typeimage/vnd.microsoft.icon
Extensions.ico
Also seen asimage/x-icon
Content-Typeimage/vnd.microsoft.icon
Compress in transit?Yes — enable gzip or Brotli
File signature00 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.

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:

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">

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.

Related types

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options