Setting up a domain for your heroku app
I’ll admit, I’m not an expert in network administration so I had a bit of difficulty getting my domain connected to heroku on my own. After about 10 minutes i ended up with an infinite redirect error.
My domain is registerd over at Hover so I was able to just contact their customer support and have them walk me through it. Here are the key changes i needed to make:
First, you need to forward the domain. Make sure you include the www if you dont want the extra headache.
Click on the DNS tab and add a CNAME record with your heroku domain:
You can find this on your heroku dashboard.
When you take care of all of that you should be good to go, unless..
Extra: Ghost config
This had me stumped for way too long, but there are 2 gotchas after you set this up with a ghost blog
- Make sure you set your global enviroment variable
HEROKU_URLto your full www domain. You can find the Config Variables section on the settings page of your dashboard.
- Clear your cache! Chrome seemed to cache the redirects long after I made the change..