Question

We're using DNS simple to point our domain to our SSL-enabled Heroku app. The behavior we're seeking is as follows:

http://ourdomain.com
https://ourdomain.com
http://www.ourdomain.com

Should all permanently redirect to:

https://www.ourdomain.com

We've already created a CNAME for www.ourdomain.com that points to our app's .herokussl.com domain, but we're not sure what to do with the naked domains. In GoDaddy, we used to do non-masked forwarding. DNSimple doesn't have forwarding, but does have special entries called ALIAS and URL, though we're not sure what to use.

Was it helpful?

Solution

To configure a redirect you should use an URL record as described in our redirect documentation.

However, it's not possible to redirect an HTTPS URL because of the priority between SSL negotiation and HTTP headers. In this case, because you also want https://ourdomain.com to redirect to https://www.ourdomain.com, then you need to create an ALIAS for ourdomain.com to your Heroku SSL endpoint and handle the redirect in your app.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top