Heroku app as a Subdomain through Cloudflare

Can a Heroku app be a subdomain through Cloudflare?

1.Through Cloudflare, I have a custom domain name of “allenmarkbrown.com” successfully being pointed to from my Github pages account (bethanybeachbum.github.io)
2. I want an app from Heroku to be a subdomain: powerball.allenmarkbrown.com
3. I did the Heroku "domains add " command and then added the assigned name as a CNAME at Cloudflare.
4. when i go to powerball.allenmarkbrown.com, i get to Heroku but it doesn’t see my app.

It sure can! ‘www’ is technically a subdomain.

Did you set up that custom subdomain at Heroku?

Yes. Attached is a picture of what I did at Heroku.


Remove the www in front of your subdomain. You don’t need it, and Cloudflare can’t provide SSL for a second level subdomain. Then it should also match the subdomain you posted.

OMG! That was it! All I had to do was remove the www in front of my subdomain. “sdayman” I can’t thank you enough for your help. I have struggled with this for ONE MONTH!!!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.