Redirecting naked domain to www with DNSimple
Asked Answered
D

1

10

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.

Doublet answered 22/10, 2013 at 18:15 Comment(0)
D
13

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.

Dorset answered 23/10, 2013 at 12:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.