Back in the pre-Mac OS X and macOS days, Apple’s System 9 and earlier relied on hidden metadata to associate files with apps. File extensions, those bits of text that follow a period at the end of a file (like .doc, .html, or .jpg) were optional, although often used for compatibility with other platforms and with web. On the web, file extensions are effectively mandatory so a browser knows how to handle a file appropriately.
Macworld reader Rick would like to monkey with that. He has a number of HTML templates, but to differentiate them from his production .html files, he puts the suffix .tt on them instead. Browsers don’t recognize these files by default. There’s a way to force an association between a file type and an application, but that application still has to recognize the extension.
If you have an extension that’s simply not mapping correctly, you can follow these steps:
Select the file in the Finder and choose File > Get Info.
In the Open With section, if there’s an appropriate app in the list, you can select it and click Change All and confirm, and now all files with that extension open in that app. You can stop here. But if the app you want doesn’t appear in the list, select Other.
Choose the app from the list that shows. In the Enable pop-up menu, you can choose All Applications, and it will let you pick any app. Check the Always Open With box to force an association.
If you’re using, for example, .tt as your HTML template extensions like Rick, you could go through steps 1 to 4, and pick Safari as the app to open .tt files. The trouble is that Safari doesn’t know that a .tt file contains HTML.
In the olden days, when everything to do with the web was more in a state of flux, you could modify and add content mappings, usually in the form used by MIME, a decades-old method of associating actions and formats with file extensions. (You’ll see MIME mentioned explicitly in email programs’ headers. Some kinds of documents also embed MIME information into their headers, so software can read a few characters of the file to figure out what it is.)
Unfortunately, there’s no way I can find to change file associations in Safari or Chrome. Firefox exposes more of this mapping information, but you can’t add new file types.
Might I suggest instead using macOS’s Tags feature? In the Finder, select Finder > Preferences and click the Tags icon. You can add an HTML Templates tag and assign that to all your templates. Then you can use a Smart Folder to gather them together, or use various Arrange By/Sort By options to group by tags.
Ask Mac 911
We’ve compiled a list of the questions we get asked most frequently along with answers and links to columns: read our super FAQ to see if your question is covered. If not, we’re always looking for new problems to solve! Email yours to firstname.lastname@example.org including screen captures as appropriate, and whether you want your full name used. Every question won’t be answered, we don’t reply to email, and we cannot provide direct troubleshooting advice.
Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read ouraffiliate link policyfor more details.