Rails + Heroku + Cloudflare - Eliminate www as a subdomain Rails + Heroku + Cloudflare - Eliminate www as a subdomain heroku heroku

Rails + Heroku + Cloudflare - Eliminate www as a subdomain


I had to remove the A name record in CloudFlare and replace it with a CNAME record. I also added 2 additional CNAME records: one wildcard and one for www.


My suggestion is to force www.mysite.com to redirect to mysite.com where you probably have the main site.

You can either accomplish it using pointing the hostname to a redirect service, or using a specific route with constraint in the routes.rb file.