Aug 10, 2011
tom

What MIME type should I put for Windows shortcut file (.URL)

Question

If I want to have a Windows shortcut file (foo.URL) to be saved for the users, what MIME type should I assign for it?

Default text/plain causes Windows to suggest it to be saved with .txt added as default.

With googling, I’ve found some alternatives:

  • text/x-uri
  • application/x-desktop
  • application/x-mswinurl

If I’ve understood right, the types beginning with “x-” are unofficial?

Is there some standard (or de facto standard) mime type to use?

br,
Touko

Answer

I ended up using application/octet-stream which seems to work fine for me (at least Windows tries to save it as .URL as such as default and not as .txt as earlier with text/plain)

Related posts:

  1. difference between mime types and extension filtering on IIS?
  2. How can I make all unrecognized file types as binary in Apache2?
  3. IIS: Request with unknown content-type denied
  4. How is an IIS7 website redirecting without URL Redirect or URL Rewrite?
  5. Mod_rewrite Not Working with URL Encoded Values

Leave a comment