untested attempt at supporting custom domains