Improve domain detection with a two passes - FIX #220
Merge pull request #231 from karlcow/domaindetection

Improve domain detection with a two passes - FIX #220