Multipurpose Internet Mail Extensions (MIME) is an internet standard that specifies how to open files with certain extensions. When a browser accesses a file with a specific extension, it automatically opens the file using the application defined in the MIME type. This topic describes how to manually add a MIME type in the .htaccess file of your website.
Limits
Standard Cloud Web Hosting (Apache): You cannot add MIME types from the management console. Instead, you must manually add the MIME types in the
.htaccessfile. For more information, see the Procedure section of this topic.Enhanced Cloud Web Hosting (Nginx): Adding MIME types is not supported by default. To add a MIME type, submit a ticket for assistance.
Procedure
This procedure applies only to Standard Cloud Web Hosting instances that run Linux.
Connect to the Cloud Web Hosting instance using an FTP client.
This topic uses FileZilla as an example. For more information, see Manage website files using FileZilla.
Download the .htaccess file to your local host.
This step assumes that the .htaccess file is in the site's root directory /htdocs.
ImportantThe path of the
.htaccessfile may vary depending on the developer's preferences. If you cannot find the file in the /htdocs root directory, contact your website developer to locate it.Open the .htaccess file on your local host.
In the .htaccess file, add one or more entries for file types and their corresponding applications.
The following example shows how to add a MIME type for APK files:
AddHandler application/vnd.android.package-archive .apkSave and close the file.
Upload the modified .htaccess file to the Linux-based Cloud Web Hosting instance.
References
If your Cloud Web Hosting instance runs on Windows, you can add MIME types in the Host Management Console. For more information, see Add MIME types for Windows-based Cloud Web Hosting.