Currently my site loads with or without www. in the front of the domain. How can I use the Rails 4 router to redirect all www traffic to just the domain, using just the naked domain.
I was able to find existing solutions for older versions of Rails but they do not work with Rails 4: https://www.bignerdranch.com/blog/redirect-www-subdomain-to-your-apex-domain-using-the-rails-router/