1
votes

Can someone explain to me how I need to configure my DNS settings using Galaxy and HTTPS? I obviously have no problem doing this on a provider with a static IP, but on Galaxy i just can't get it to work using DNSimple.

I want the following setup:
http://example.com -> https://www.example.com
https://example.com -> https://www.example.com
http:/www.example.com -> https://www.example.com
https://www.example.com -> https://www.example.com

Can someone please provide a TESTED and WORKING setup for this using FORCED HTTPS? Should i host my certificate on DNSimple or Galaxy? Should i add both domains on galaxy? What will my ALIAS and CNAME record be?

Im hosting on eu-west-1.galaxy-ingress.meteor.com .

Thank you!

1

1 Answers

0
votes

The http:// and https:// are irrelevant to the DNS records, they are just telling your browser what protocol to use. example.com and www.example.com are two different Fully Qualified Domain Names (FQDNs), and both need A records to the static ip. So you would make a record on your root zone @ IN A static-ips (@ means zone root so equivalent to example.com. IN A static-ips), and you would need a second record for www, www. IN A static-ips). This will make sure both go to the right ip

Now for the ssl certificate, the cert has to match the FQDN that the browser is trying to access, so if you only have a cert for example.com, then it will fail for www.example.com, if this is the case you can make a new cert with the common name example.com, and add the Subject Alternative Name (SAN) www.example.com to the cert during creation, this will make sure it works for both

If you want users who access http://example.com to go https://example.com, then that can't be done through DNS, server side or client side you will have to detect this and redirect to https, and depending on what you're using to host your app (e.g. apache, node, etc), there will be more documentation on that