I have a rails app running on Heroku and I want to rename it. This seems easy enough, but I also have users whom I want to redirect to the new URL if the visit the old one.

I suppose one way to do this would be to create a whole new Rails app with the old name who's sole purpose is to redirect traffic to the new address, but I'm wondering if there's a better way to do this.

  • 1
    I think the second app approach is your only way. You should be pointing a domain at it anyways, though, for this sort of reason.
    – ceejayoz
    Jul 14, 2016 at 2:51

1 Answer 1


You don't need to create a new app. You can simply associate both domains to the same app, and handle the redirect internally in the app.

Intercept the request and check the domain the request is for. If the domain is the old one, redirect to the new one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.