title: .htaccess Redirect IP address to HTTPS domain
body: <p>I am trying to redirect my sites ip address to its https domain but I am getting the error</p>
  
  <pre><code>Your connection is not private
  
  Attackers might be trying to steal your information from 123.123.123.123 
  (for example, passwords, messages, or credit cards). NET::ERR_CERT_COMMON_NAME_INVALID
  </code></pre>
  
  <p>This is my current .htaccess file</p>
  
  <pre><code>RewriteEngine On
  RewriteBase /
  
  RewriteCond %{HTTP_HOST} ^123\.123\.123\.123
  RewriteRule (.*) https://example.com/$1 [R=301,L]
  </code></pre>