Hostname was not set and correction in certificate.js

Jira Issue: WP-528