4

Because of Heroku's apex domain limitations when using their SSL endpoint, I set up DNSimple's Alias to give me root URL functionality.

Now I've got both the root and the www versions of the site up and running over SSL, but I'd like to redirect it all to www., which heroku suggests doing in the (Rails 3.2) app itself.

These are some suggestions floating around for doing this:

So what's the best/recommended way to redirect root URL's to www (incl https) in Rails? Details are appreciated since most examples show how to do it the other way around.

Community
  • 1
  • 1
sehop
  • 95
  • 1
  • 5
  • 1
    I would suspect that the best would be the one that incurs the least overhead. Thus, DNS is best, then Rack, then routes, then a controller filter. But I am not sure (thus, I'm not posting an answer just yet). – ivanreese Dec 11 '15 at 19:31

0 Answers0