handle local / dev domains correctly

cc @calvinfo