What is the proper way to send a subdomain.herokuapp.com to the apex domain of the application? This is to avoid multiple domain names with the same content.
Quoting from https://devcenter.heroku.com/articles/custom-domains
The domain myapp.herokuapp.com will always remain active, even if you’ve set up a custom domain. If you want users to use the custom domain exclusively, you should send HTTP status 301 Moved Permanently to tell web browsers to use the custom domain. The Host HTTP request header field will show which domain the user is trying to access; send a redirect if that field is myapp.herokuapp.com.
You can redirect requests to the "subdomain.herokuapp.com" using a before filter in ApplicationController or using a constraint in rails routing.