Subdomain redirect to Heroku

August 20, 2014 5.6k views


I would redirect a subdomain to a heroku app (eg:

I tried remove A entry and add a CNAME entry with the url but doesn’t work.

Could someone help me? Any tip for this redirect works?


1 Answer

Hi there!

Heroku has their own DNS management solution built into their product. You should be able to create a CNAME by running:

heroku domains:add

This should generate a DNS record like:

Record Name Target
CNAME blog

Check out Heroku’s own documentation on the process.

  • Hello

    I just created the subdomain in Heroku, but the main domain is hosted in DigitalOcean. So, need I do something in DigitalOcean?

  • If the root domain is hosted with DigitalOcean, you’ll also need to add that CNAME in the DigitalOcean DNS panel.

Have another answer? Share your knowledge.