devkult_
tools29converters34
home/mime/.rar

.rar MIME type

RAR archivearchives

application/vnd.rar

RAR archives. Registered as application/vnd.rar; older servers send application/x-rar-compressed.

MIME typeapplication/vnd.rar
Extensions.rar
Also seen asapplication/x-rar-compressed
Content-Typeapplication/vnd.rar
Compress in transit?No — already compressed
File signature52 61 72 21 1A 07 (Rar!..)

Good to know

  • Creating RAR files requires proprietary software; prefer ZIP or 7z for distribution.

Serve .rar files with the right type

The response header to send:

Content-Type: application/vnd.rar

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)
application/vnd.rar rar;
Apache (.htaccess or server config)
AddType application/vnd.rar .rar
Express
res.set("Content-Type", "application/vnd.rar");
Python
import mimetypes

mimetypes.add_type("application/vnd.rar", ".rar")
HTML file input
<input type="file" accept=".rar,application/vnd.rar">

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.rar | grep -i '^content-type:'
file --mime-type file.rar

Frequently asked questions

What is the MIME type for .rar files?

application/vnd.rar. You may also see application/x-rar-compressed, but application/vnd.rar is the one to send.

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

Content-Type: application/vnd.rar. It's already compressed, so servers shouldn't gzip it.

How can I tell if a file is really a .rar?

Check its bytes rather than the extension: RAR files start with 52 61 72 21 1A 07 (Rar!..). On the command line, file --mime-type name.rar does this for you.

Related types

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