title: Using .htaccess to redirect www URLs to non-www for https
body: <p>Please provide me with .htaccess syntax to do the following:</p>
  
  <ol>
  <li>Redirect from <strong>http</strong> to <strong>https</strong></li>
  <li>Redirect from <strong><a href="https://www.domain.com.uk" rel="nofollow noreferrer">https://www.domain.com.uk</a></strong> to <strong><a href="https://domain.com.uk" rel="nofollow noreferrer">https://domain.com.uk</a></strong></li>
  </ol>
  
  <p>I tried the following but it didn't work:</p>
  
  <blockquote>
    <p>RewriteCond %{HTTP_HOST} ^www.(.*)</p>
    
    <p>RewriteRule ^.*$ <a href="https://%1/" rel="nofollow noreferrer">https://%1/</a>$1 [R=301,L]</p>
  </blockquote>