title: Redirect to 'www' before ssl requirement
body: <p><strong>Problem</strong></p>
  
  <p>I currently have the problem where <a href="https://domain.com" rel="noreferrer">https://domain.com</a> does not redirect to <a href="https://www.domain.com" rel="noreferrer">https://www.domain.com</a> and shows an untrusted ssl certificate.</p>
  
  <p>This is Related to which is a ruby-on-rails solution
  <a href="https://stackoverflow.com/questions/7506954/redirect-to-www-before-force-ssl">redirect to &#39;www&#39; before force_ssl</a></p>
  
  <p><strong>Question</strong></p>
  
  <p>Is there a way to redirect to the www domain before the SSL requirement kicks in?</p>
  
  <p>I am using PHP.</p>