Have a look at this link from the Heroku docs:
https://devcenter.heroku.com/articles/avoiding-naked-domains-dns-arecords#subdomain-redirection
The yellow boxes says:
Requests made directly to naked domains via SSL (i.e. https://mydomain.com) will encounter a warning when using subdomain redirection. This is expected and can be avoided by only circulating and publicizing the subdomain format of your secure URL.
Is that really the only solution? Just hope that people don't type in the url without the wwws?
I've had several problems with people just removing the sub-domain from the url to get to the homepage (on https) and encountering an ssl warning?
Has anyone else figured out a way around this?
Go to the record editor and two DNS records, one for each host name, pointing to the Heroku SSL endpoint: Add an ALIAS record to point example.com to Heroku. Leave the Name of the record empty and set the Content field to the SSL endpoint example.com.herokudns.com. Add a CNAME record to point www.example.com to Heroku.
Heroku SSL is a combination of features that enables SSL for all Heroku apps. Heroku SSL uses Server Name Indication (SNI), an extension of the widely supported TLS protocol.
The best idea we have found so far is to setup two Amazon EC2 micro machine instances with a small bit of nginx configuration. Then, provision two elastic IP addresses to point to those EC2 instances and point 2 A records to those IP addresses. This way, if something goes wrong on the hardware, you can always point your elastic IPs at another EC2 machine without waiting for DNS to propagate. Users going to https://example.com and http://example.com will get a 301 to the domain and no SSL warning.
server { listen 80; listen 443 default_server ssl; server_name example.com; ssl_certificate server.crt; ssl_certificate_key server.key; return 301 https://www.example.com$request_uri; }
Another idea is to use the great service provided by wwwizer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With