The https check should come first.