Added canOpenURL: to check if the https URL can be opened before switching to the http variant.