How to change the default Web browser and E-mail client in OS X

SafariIconXWhen you click a link in OS X, be it a Web link or a mailto link for sending an e-mail, OS X will open the default program that is associated for handling this type of link. In a fresh OS X installation, these will be set to Safari and Mail, but you can use any program that is capable of managing these links.

As with handling files of a particular type, OS X uses its launch services feature to associate links to programs as well. In the case of Web content, hyperlinks are simply referred to as “public.html” content, which is then linked to a relevant browser in the system’s launch services. Whenever this content is opened directly (ie, you click a link in an e-mail), the launch services will open the browser and send the content to it for handling.

You can see all of the current associations in your system by viewing the system’s lsregister database, which can be done in two ways:

  1. For Terminal-savvy users who have the OS X locate database enabled (), you can run the following command to view the lsregister database in a text file:
    `locate lsregister` -dump | open -fe
  2. For those without the locate database enabled, you can run the following command (copy and paste both lines as-is):
    chServices.framework/Versions/A/Support/lsregister -dump | open -fe
  3. Another option is to look at the LSHandlers entry in the launch services property list, which can be done by opening the file in the /Library/Preferences directory, or by running the following command:
    defaults read LSHandlers | open -fe
LSHandler settings in OS X

The handler “” is set to open content of type “public.mp3” for this system (click image for larger view).

The resulting file that opens in TextEdit will be rather large (smaller for the third option), but if you scroll all the way to the bottom, you will see a list of handlers that show extensions or content type and the programs (designated by the keyword “Roll”) associated to each. For example, the extension “public.mp3” will likely be associated with “” to indicate Apple’s iTunes program as the handler.

For Web and e-mail links, you can peruse this list and locate content type “http,” “https,” and “mailto” to see what handlers are associated with them.

Unfortunately the adjustment of this database cannot be done effectively in the Terminal, and instead requires you to do so from a program like the Finder where you can set the default program for a file (or all files of similar type) in the file’s information window. The same goes for associating Web browsers and e-Mail clients for handling hypertext and mailto link types.

Firefox default browser settings

Firefox only has options to set itself as the default browser (click image for larger view).

In some programs like Firefox, there may be a built-in setting for making this program the default handler of a specific content type. If you go to Firefox’s “Advanced” settings, for instance, you will see a button to set it as the default browser, and then a checkbox to have the program automatically check for this association when it is launched.

While this feature can be convenient, it does have some limitations. For one, it may not be available in all programs. Furthermore, it is one-directional, meaning even though you can make the current program the default handler, you cannot use it to set other programs as the default, and will instead have to rely on them having this feature to change this association.

Safari default browser settings

Both Safari (shown here) and Mail’s settings have an options to choose any program to be the default handler for their respective contents (click image for larger view).

This may be the case for Firefox, Apple’s built-in programs for handling Web and email links (ie, Safari and Mail) do allow you to set any program of your choosing as the default handler for these contents. For selecting a default Web browser to use, open Safari and in the General section of its preferences, you can select either a detected browser or any other application of your choosing as the program for handling http and https content.

Likewise, you can use Apple’s Mail program to set any e-mail client of your choosing for handling mailto links. To do this, as with Safari you just need to go to Mail’s preferences and choose a default email reader from the drop-down list.

Since other programs you have may not contain the ability to set default applications in this manner, even if you do not use Safari or Mail, they may be required to use periodically for making these changes. This might be especially true if your preferred application does not have an option to change link associations itself.

3 thoughts on “How to change the default Web browser and E-mail client in OS X

  1. Stephen Ferris

    For apps that don’t have a default handler option, maybe the old preference pane, Default Apps is a good alternative.

  2. High End

    Don’t get me wrong, I like Safari but Google Maps don’t load very well lately in the browser. I have considered moving over to Google Chrome where maps open faster than Safari but Chrome has a real lousy time on my Mac to enter text. You have to wait till hell freezes over (forever in computer time these days) before you can. Since jumping onto the Mac bandwagon 7 years ago I have been using a System Preference app called Default Apps to change the default app to some else if the need arises.

  3. B. Jefferson Le Blanc

    I use more than one browser now because all the defensive extensions I’ve added to Safari to protect my privacy and eliminate ads, Flash and Javascript, make it difficult or impossible to participate on some web blogs – Macworld in particular. This includes the MacIssues blog which will not work in Safari either as I have it configured – though, thankfully, this part of MacIssues still works. I keep a copy of Firefox stripped as bare as possible of plug-ins and extensions so that I can use those web sites. So being able to set a default browser is important – and knowing how to do so is thus quite useful.

    I already knew how to set the default apps in Safari and Mail, but I was interested to see what Terminal solutions Topher would offer. I was surprised to see that there was no Terminal answer for the question of browser and mail defaults. What’s more puzzling is that there is no way to set them in System Preferences, where, in my opinion, they logically belong.

Comments are closed.