If your MacOS X 10.11 (El Capitan) loses the ability to set a default browser, you can clear up the bug by rebuilding the Apple Launch Services.
1. You use two browsers (Firefox and Chrome)… the wrong browser starts launching as the (unintended) default after you opened it once for some task — despite the intended default browser launching fine up to that point, the unwanted browser takes over as a URL handler in other programs.
2. When you try to reset the default browser in System Preferences > General, there are no browsers showing in the picker!
Run this terminal command:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user ; killall Dock
Then you’ll see your choices again:
Inspired by this specific answer on StackExchange Mac OS X 10.11 browser default.