What is MIME type "audio/mod"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

audio/mod is a MIME type used for module music files. It stores both sound samples and sequencing data that direct playback. These files were common in tracker software engines and demo scenes.

Key uses include:

The design allows dynamic rearrangement of samples and patterns for flexible music editing.

Common module file types include MOD, FAR, XM, IT, STM, AMF, MED, WOW, DMF, S3M, 669, MTM, MT2, ULT, and OKT.

For more details, visit the Module File article.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: audio/mod    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="audio/mod">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'audio/mod');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

Do web browsers natively support audio/mod playback?

No, standard HTML5 <audio> elements do not natively support audio/mod files. To play module files (like .mod, .xm, or .it) in a browser, developers typically use JavaScript libraries such as libopenmpt (compiled to WebAssembly) or mod.js to render the audio.

How do I configure Apache to serve tracker music correctly?

You can define the MIME type in your .htaccess file or main configuration to ensure browsers identify the files correctly. Add the line: AddType audio/mod .mod .xm .it .s3m to associate these extensions with the correct type.

What software can open and play audio/mod files?

You can use versatile media players like VLC Media Player or Winamp for playback. for editing or composing, dedicated tracker software like OpenMPT, MilkyTracker, or FastTracker 2 is required to manipulate the samples and patterns.

How do I set up Nginx to handle audio/mod files?

In your Nginx configuration (usually mime.types or inside a server block), add the type definition. Use the syntax: types { audio/mod mod xm it s3m; } to ensure the server sends the correct header for these file extensions.

Why use audio/mod instead of MP3 or WAV?

Files served as audio/mod are significantly smaller than MP3s or WAVs because they contain musical notation and short samples rather than a full audio recording. This makes them ideal for procedural generation, retro gaming, or applications with strict storage limits.

Are there alternative MIME types for module files?

Yes, while audio/mod is a common convention, you may also encounter audio/x-mod, audio/xm (specifically for FastTracker files), or audio/it (for Impulse Tracker files). It is best practice to configure your server to handle the specific extensions used by your application.

Why does my browser download the .mod file instead of playing it?

Since browsers lack a built-in decoder for audio/mod, they often treat the file as generic binary data. This triggers the default "Save As" behavior unless a specific browser plugin or a JavaScript-based player is embedded in the webpage to handle the stream.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.