How to set default web browser per domain?

14

3

My default web browser is Opera. This is the desired behavior for general browsing.

However, I would prefer that a URL in a domain opens in Internet Explorer where the content of that domain is more compatible with Internet Explorer than with Opera.

For example, this link:

http://ssrs/Reports

should open in Internet Explorer because the location is in the ssrs domain. In my organization, content in this domain is served by SQL Server Reporting Services, which works well only with Internet Explorer.

This link:

http://fogbugz/default.asp

should open in Internet Explorer because the location is in the fogbugz domain. In my organization, content in this domain is served by FogBugz. Several features of FogBugz are broken or buggy in Opera.

Any other domain should open in Opera.

How do I configure Windows 7 with these rules?

Iain Samuel McLean Elder

Posted 2012-07-12T10:57:27.773

Reputation: 649

2

Some alternate ways to solve the issue from an older question. Just to note that i can't think of any way to do this offhand, since your browser would need to be aware of other browsers, and quirks mode.

– Journeyman Geek – 2012-07-12T11:04:05.807

When you want to open them, where are you typing these URLs? – Ƭᴇcʜιᴇ007 – 2012-07-12T11:58:41.423

I'm not typing them. The links appear in other applications. For example, someone sends me an IM message with a link to FogBugz case. – Iain Samuel McLean Elder – 2012-07-12T13:36:07.550

If you'd be willing to switch to FF, it has an extension that will open pages in IE based on url. – Paul – 2012-07-12T13:40:47.083

I don't want to change my primary browser. I'm looking for a way for the shell to route a URL to a browser according to the URL's form. – Iain Samuel McLean Elder – 2012-07-12T13:53:34.250

1In particular, I don't want a link typed into the address bar of Opera to open in Internet Explorer. If I type it in Opera, it should open in Opera. If I type it in Internet Explorer, it should open in Internet Explorer. If the URL is found outside of the context of a browser, then the system should decide which browser should handle it. – Iain Samuel McLean Elder – 2012-07-12T13:55:59.723

perhaps look into adding a right-click option to open in alternate browsers on links. Chrome or FF you could create an extension to do so. Anything like that possible for opera? – datatoo – 2012-07-12T13:57:17.600

@datatoo Opera has the 'Open with' context-menu option to open the current URL in another browser. But I don't want a URL in my messenger to open Opera just so that I can choose 'Open with > Internet Explorer'. It's quicker just to start Internet Explorer and copy the link into its address bar. – Iain Samuel McLean Elder – 2012-07-12T14:02:25.753

@isme sorry my mistake, it would be determined by your IM app, not opera. – datatoo – 2012-07-12T16:22:39.643

Answers

8

Browser Chooser 2 should do everything you need. From the site:

Browser Chooser 2 is a small tool acting as the default browser allowing you to choose what browser or other tool to open any given link in.

However, it can do a lot more. By default it gives a pop-up similar to TurnOut.NET but is far more configurable. It will let you add URLs with wildcards and regular expression matching, and automatically open it in the corresponding browser (see screenshot).

URL Matching Configuration Window

It's a beta release and a little unpolished, but it should fit the bill.

nullability

Posted 2012-07-12T10:57:27.773

Reputation: 256

4

There can't be a simple system-wide solution. Here is why:

  • Windows will always recognize your http://ssrs/Reports link as HTTP-protocol and open it with the registered application regardless of the rest of the link.
  • you can associate another browser which windows 7 should use for HTTP-URLs.
    But that won't be conditional since you can only choose one at a time.
  • you can modify this association via regedit.exe to point it to a (portable) software

Your best shot will be to write (or ask a developer for) a short AutoHotKey tool and point your HTTP-protocol to that software via regedit. The link shows the basic steps.
After that your new tool will get every URL as parameter and can choose what to do next

if parameter like http://ssrs/* then 
   open "C:\Program Files\Internet Explorer\iexplore.exe"
else
   open "C:\Program Files\Opera\opera.exe"
end

My AHK days are long gone.
But maybe another superuser can help you out.

nixda

Posted 2012-07-12T10:57:27.773

Reputation: 23 233

4Actually your first reason as to why it can't be done is the solution

1.) Get a developer to write a simple app. 2.) Register that app as the handler for all HTTP requests (i.e. make that app the "Default Browser" in Windows). 3.) The app uses a list of regex values from a config file based on URL to decide which browser to open the URL with, including a fallback browser -- so it does that -- and then it closes itself, never to be seen again. 4.) Share that app with the rest of us. :D – BrainSlugs83 – 2013-05-06T18:34:36.040

2

For Mac: Choose Wisely

For Windows: TurnOut.NET

Rory

Posted 2012-07-12T10:57:27.773

Reputation: 21

Unfortunately, these work by setting the browser chooser as default browser, and therefore fail for all links clicked within a browser — only links from other programs are affected. – Daniel Beck – 2013-02-07T16:09:18.143

When recommending software or products, please review this meta post on how.

– James Mertz – 2013-02-07T16:22:49.620

@Daniel Beck -- that's not correct -- for example, IE is not my default browser, Chrome is. When I click on a link in IE, guess what? It opens in IE. (I can also reverse this scenario for Chrome, or Firefox -- same repro.)

Browsers don't call the "Default Web Browser" app to open hyperlinks; that would be silly. They just follow them. – BrainSlugs83 – 2013-05-06T18:38:45.200

TurnOut.NET seems like it would almost do the trick -- clearly though it needs some way to be configured with RegExs or at the least hard coded domains to meet the OP's needs. – BrainSlugs83 – 2013-05-06T18:40:12.677

@BrainSlugs83 That's exactly the point I was trying to make. Links clicked within a browser are not affected. If the user clicks on a link to http://ssrs/Reports in Opera, it should probably open in Internet Explorer as per the requirements. – Daniel Beck – 2013-05-06T19:02:12.320

Wait. I re-read -- that is the point you're trying to make. So, how is that a failure? That's exactly what the OP wants. He only wants links from outside the browser to be affected.

OP Wrote: "... I don't want a link typed [in] Opera to open in [IE]. If I type it in Opera, it should open in Opera. If I type it in [IE], it should open in [IE]. If the URL is found outside of the context of a browser, then the system should decide which browser should handle it." – BrainSlugs83 – 2013-05-07T01:59:21.517

1

Assuming you are in a corporate environment and are willing to use Google Chrome, there is a feature called Legacy Browser Support (LBS).
This uses group policy to force certain URLs to open in an alternate browser (such as IE). This is the LBS extension add-on store home page

There is to much detail to add it all here so here are the linked pages:
Step 1 Read this source information page Legacy Browser Support.
Step 2 Then install from 'Install LBS Chrome extension'
Step 3 Configure which browsers to open with LBS
Step 4 feedback and roll out

This should work regardless of if the user types in the URL or clicks on a link in an email application:

Derek

Posted 2012-07-12T10:57:27.773

Reputation: 11

0

Try this, create an shortcut and add the browser you want and then the URL "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" https://...

Warren

Posted 2012-07-12T10:57:27.773

Reputation: 1

This only works for specific sites and requires creating shortcuts for each site desired. It seems OP is asking a slightly different question which the existing answers already allow that desired behavior. That said, I've used this solution myself for a few specific sites in our environment that need a certain browser to work properly, and it works well for that. – music2myear – 2017-01-09T18:21:41.850