title: What controls redirection from https://www.host.com to https://host.com?
body: <p>Everything but <a href="https://www.host.com" rel="nofollow noreferrer">https://www.host.com</a> to <a href="https://host.com" rel="nofollow noreferrer">https://host.com</a> works:  </p>
  
  <ol>
  <li>host.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --> <a href="https://host.com" rel="nofollow noreferrer">https://host.com</a>  </li>
  <li>www.host.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --> <a href="https://host.com" rel="nofollow noreferrer">https://host.com</a>  </li>
  <li><a href="https://host.com" rel="nofollow noreferrer">https://host.com</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --> <a href="https://host.com" rel="nofollow noreferrer">https://host.com</a>  </li>
  <li><a href="https://www.host.com" rel="nofollow noreferrer">https://www.host.com</a> --> ? error</li>
  </ol>
  
  <p><strong>My DNS Records are like this:</strong>  </p>
  
  <ol>
  <li>Type: A Record 
  
  <ul>
  <li>Host: @  </li>
  <li>Value: 111.222.333.444   </li>
  </ul></li>
  <li>Type: CNAME Record 
  
  <ul>
  <li>Host: www</li>
  <li>Value: host.com.  </li>
  </ul></li>
  <li>Type: URL Redirect Record - unmasked
  
  <ul>
  <li>Host: @  </li>
  <li>Value: <a href="http://host.com" rel="nofollow noreferrer">http://host.com</a>   </li>
  </ul></li>
  <li>Type: URL Redirect Record - unmasked 
  
  <ul>
  <li>Host: www  </li>
  <li>Value: <a href="http://host.com" rel="nofollow noreferrer">http://host.com</a>   </li>
  </ul></li>
  </ol>
  
  <p>Along with some MX records. This DNS is on Namecheap so <em>I think</em> <code>URL Redirect Record</code> is a <code>301 Permanent Redirect</code>.</p>
  
  <p>Also, now after running the URL Redirect Records, <code>nslookup host.com</code> returns two different IP addresses. </p>
  
  <p><strong>What controls that redirection, from <a href="https://www" rel="nofollow noreferrer">https://www</a> to <a href="https://non-www" rel="nofollow noreferrer">https://non-www</a>?</strong></p>
  
  <p>On Ubuntu 16, DigitalOcean Droplet, with SSL setup via certbot.</p>