Question

How would one setup a redirect from example.com to www.example.com using Heroku and Cloudflare?

Was it helpful?

Solution

It's not something that you can do at CloudFlare since they now host the DNS for your domain and don't support redirects so it's something you'd have to do at the application level.

http://support.cloudflare.com/discussions/questions/259-redirect-to-www

OTHER TIPS

One free way to do it is to use the Naked Domain Redirect from wwwizer.com. You just make an A record for example.com to 174.129.25.170 (you can do that from Cloudflare). wwwizer will then redirect the request to www.example.com. It's probably the easiest way that I know how to do it.

Your best bet here is to do the redirect with something like Rack-rewrite, or at the DNS level if you're hosting DNS on Zerigo.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top