Everything but https://www.host.com to https://host.com works:
My DNS Records are like this:
Along with some MX records. This DNS is on Namecheap so I think URL Redirect Record
is a 301 Permanent Redirect
.
Also, now after running the URL Redirect Records, nslookup host.com
returns two different IP addresses.
What controls that redirection, from https://www to https://non-www?
On Ubuntu 16, DigitalOcean Droplet, with SSL setup via certbot.
Found the error.
The SSL certificate was missing the www.example.com
version/domain.
Since SSL was installed with Let's Encrypt / Certbot, using sudo certbot certificates
showed that Domains:
only had the non-www version.
So redirection was actually working well in all cases except when https
caught the www version and threw an error due to missing certificate. Also, redirects 3 and 4 in the original post were unnecessary.