Check if you page is using SSL if (!((isset($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] == "on"))) { header('Location: https://pmsensecom.ipower.com/wbsp/reg/regdata.php'); die(); }