normalize host and scheme