What is the correct MIME type for a tar.gz file?
What is the correct MIME type for a tar.gz file?
I've searched around and found several values being used, including:
application/x-gzip
application/x-gtar
application/x-tgz
But I could find no indication as to which of these (if any) was the correct or canonical value.
As of August 2012, the MIME type recommended in RFC 6713 is application/gzip
.
According to the IANA registry, tar is not an official media type, so a GZipped tar file is officially only a compressed file.
Hypothetically, if a tarball were an official media type and following conventions, its MIME type would be application/tar
(file extension .tar) and its compressed version would be application/tar+gzip
(file extensions .tar.gz and .tgz).
Although most are deprecated, they are all technically correct, just different MIME types.
The correct MIME type is application/x-gzip
according to cPanel standards.