DevToolsmith

RSS MIME Type

application/rss+xml is the MIME type for RSS feeds. Here is the Content-Type header to send, the file signature, and how to configure servers and code.

MIME type
application/rss+xml
Extensions
.rss
Content-Type header
application/rss+xml; charset=utf-8
Registered
No, a common convention
Compress with gzip
Yes, it is text or uncompressed
Category
Web

About RSS feed files

Link the feed from your pages with <link rel="alternate" type="application/rss+xml" title="Blog" href="/feed.xml">, so readers and browser extensions find it. Atom feeds use application/atom+xml. Many feeds are served as application/xml or text/xml, which feed readers accept just as well.

Other types seen for these files: application/atom+xml , application/xml , text/xml . Accept them when reading uploads, but send application/rss+xml yourself.

File signature

RSS has no fixed signature: it is text without a magic number, so validate uploads by parsing the content rather than by checking bytes.

Serve .rss with the right Content-Type

Response header
Content-Type: application/rss+xml; charset=utf-8
nginx (a line in the types { } block of mime.types)
application/rss+xml rss;
Apache (.htaccess or server config)
AddType application/rss+xml .rss
AddCharset UTF-8 .rss
Caddy
@rss path *.rss
header @rss Content-Type "application/rss+xml; charset=utf-8"
Check what a server sends
curl -sI https://example.com/file.rss | grep -i '^content-type'
# Content-Type: application/rss+xml; charset=utf-8

Set the type in code

Node.js (Express)
res.set('Content-Type', 'application/rss+xml; charset=utf-8');
Python
import mimetypes

mimetypes.add_type('application/rss+xml', '.rss')  # if your system doesn't know it
mimetypes.guess_type('file.rss')[0]  # 'application/rss+xml'
Go
mime.AddExtensionType(".rss", "application/rss+xml; charset=utf-8")
w.Header().Set("Content-Type", "application/rss+xml; charset=utf-8")

Accept .rss uploads

HTML
<input type="file" accept=".rss,application/rss+xml">

The accept attribute only filters the file picker; users can still choose another file. Listing the extension as well as the type matters, because operating systems don’t always report the type you expect.

Related types

  • .xml (application/xml): XML
  • .html (text/html): HTML
  • .json (application/json): JSON

More web

.css , .js , .mjs , .svg , .wasm , .webmanifest , .vtt . Look up any extension or type with the MIME type lookup.

Sources

Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.

Frequently asked questions

What is the MIME type for .rss files?

application/rss+xml. You may also see application/atom+xml, application/xml, text/xml, which are older or unofficial; send application/rss+xml. It is a text format, so add the character set: "Content-Type: application/rss+xml; charset=utf-8".

Why does my server send the wrong Content-Type for .rss?

Web servers pick the type from the file extension using a table (mime.types in nginx and Apache). If .rss is missing from that table, they send a default such as application/octet-stream or text/plain. Add the mapping as shown on this page, then check the response with "curl -sI".

How can I check that a file really is RSS?

RSS has no fixed file signature, so the extension and content are all you have. Check that the content is what you expect, for example by parsing it, before trusting an upload.