What is MIME type "text/gemini"?
A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.
text/gemini is used with the Gemini protocol. It tells clients that the file uses a light, text-based markup. This format is designed for a distraction-free reading experience.
Files served as text/gemini are simple. They focus on plain text and basic formatting. No advanced scripts or styles are supported.
- The main use is to deliver content over the Gemini network.
- It ensures a secure and private browsing experience.
- It simplifies content creation and presentation.
Files using this MIME type use the file extension GMI. More details about the Gemini protocol can be found at this reference.
Associated file extensions
Usage Examples
HTTP Header
When serving content with this MIME type, set the Content-Type header:
Content-Type: text/gemini
HTML
In HTML, you can specify the MIME type in various elements:
<a href="file.dat" type="text/gemini">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', 'text/gemini');
res.end('Content here');
}).listen(3000);
Associated file extensions
FAQs
Can I view text/gemini files in standard web browsers like Chrome or Firefox?
Not natively. Standard web browsers do not support the Gemini protocol or render text/gemini content out of the box. You must use a dedicated Gemini client (such as Lagrange or Kristall) or use an HTTP-to-Gemini proxy service.
What is the correct file extension for text/gemini?
The standard file extension is .gmi. While you might occasionally see .gemini, most servers and clients are configured to associate the text/gemini MIME type specifically with the gmi extension.
How do I configure Nginx to serve .gmi files with the correct MIME type?
If you are serving Gemini files over HTTP (for mirroring or archiving), add text/gemini gmi; to your mime.types file. This ensures that when a user downloads a .gmi file, the browser recognizes it correctly instead of treating it as generic binary data.
How is text/gemini different from text/html?
text/gemini (often called Gemtext) is far simpler than text/html. It does not support inline images, CSS styling, scripts, or complex layouts. This limitation is intentional to provide a consistent, privacy-focused, and distraction-free reading experience.
Why does my text editor open .gmi files as plain text?
Because text/gemini is a plain text format. You can edit these files in Notepad, Vim, or VS Code just like you would a .txt or .md file. The markup syntax is line-based and human-readable even without a specialized renderer.
Does text/gemini support Markdown formatting?
It uses a syntax very similar to Markdown, but it is not identical. For example, text/gemini uses # for headings and * for list items, but it handles links differently (placing them on their own lines) and does not support inline bold or italic formatting.
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.