Nepal on Rails

millisami's rants!

Octopress Heroku Custom Domain to Redirect to Non-www

Recently I’ve moved to Octopress with Heroku free hosting. Here I am not going to on how to migrate or create a new Octopress powered blog. Instead polish the final DNS part.

Objective: Visiting to www.nepalonrails.com or www.nepalonrails.com/any-page, should do 301 permanent redirect to nepalonrails.com or nepalonrails.com/any-page, carrying along the PATH_INFO as well.

After all the work done, open up the Heroku’s app dashboard and add the custom domain.

heroku custom domain

For this blog, I’ve only added the root domain nepalonrails.com

Then on your DNS provider, we have to add the CNAME records. Here I use NameCheap. In the manage domain page of NameCheap, click the All Hosts link in the left sidebar and add those values:

namecheap domain manage

Comments