5

We're hosting a Rails 3 app on Heroku. Heroku suggests redirecting naked domains (example.com) to sub-domains (www.example.com) when using their service. This is because they prefer CNAMES over A records (since their IP address might occasionally change).

However, personally I'd prefer to use a naked domain (instead of www) for our site. We're using DNSimple to manage the DNS for our site. If we use their ALIAS feature, does this mean that we should be able redirect all traffic to the naked domain without any worry?

Also, is there anything else we should be aware of when using a naked domain on Heroku, besides following this advice in regards to SSL?

Community
  • 1
  • 1
Sky
  • 4,327
  • 4
  • 26
  • 40

2 Answers2

6

DNSimple ALIAS record negates the problems usually experienced with naked domain so you will be fine.

John Beynon
  • 37,398
  • 8
  • 88
  • 97
  • I'm getting an Access-Control-Allow-Origin error when users at domain.com query the api at www.domain.com and vise versa. – ajbraus May 29 '15 at 04:41
0

I believe you can set a wildcard domain to allow your app to control the routing if any subdomains... Here's what heroku says: https://devcenter.heroku.com/articles/custom-domains

I'm not sure of the security that way, but it might be a solution for you.

Joe Saunders
  • 798
  • 1
  • 9
  • 27