Private domain name in Heroku app
Category : DevOps Tag : 101series
Jan. 11, 2021, 8:46 p.m.

Short Description :
How to replace heroku domain to private domein for a heroku app
source : google domain

<h3>Background</h3><p>One of a headache to use multiple cloud platform is that each cloud has their own way to set up private domain name. Here I'll record my log and explain how to set up private domain name in heroku apps</p><p><br></p><h3>Prerequisites Assumption</h3><ul><li>you have a private domain gotten in google domains</li><li>you have application hosted in heroku (your appname would be &lt;your app name&gt;.herokuapp.com)</li></ul><p><br></p><h3>Step1 : Setting in Heroku</h3><p>Go to your heroku app page, select settings at app nav bar</p><p><img src="/media/django-summernote/2021-01-11/b455a37e-24e2-41fd-93fb-24e4071f73d9.png" style="width: 100%;"></p><p><br></p><p>Then going to domains and push "add domain" and put your private domain name under "domain name". make sure to put "www" before your private domain name. Copy DNS target for now (and you will need to paste to google domain page later)</p><p><img src="/media/django-summernote/2021-01-11/9e93feb7-b0ce-49b7-8e78-2b09ae9ecf19.png" style="width: 100%;"><br></p><p><br></p><p>If your app is free dyno plan, you might not have SSL which requires for secure HTTPS connection. Changing from free to hobby dyno would change from HTTP application layer communication to HTTPS transport layer secure connection.&nbsp;</p><p><br></p><h3>Step2 : Setting in Google Domain</h3><p>Go to your domain page in google domain, and select "DNS" at left pane.</p><p>Going to "Synthetic records" and push "add". Select "subdomain forward" at pull down, put "@" at Subdomain field, and put "www.&lt;your domain name&gt;.com" to at Destination URL. You don't have to touch radio buttons for now.</p><p>Then going to "Custom resource records, creating new field, putting "www" at name, selecting "CNAME", pasting DPN target from heroku page under data field</p><p><img src="/media/django-summernote/2021-01-11/c1675578-df18-401e-a065-deae97dac1cc.png" style="width: 100%;"></p><p><br></p><p>You are all set now. Google says that it will reflect within 48hours. My case was ~10min.</p><p><br></p><p>Reference</p><p><a href="https://medium.com/@david.gagne/set-up-a-custom-domain-for-your-heroku-application-using-google-domains-guaranteed-a2b2ff934f97" target="_blank">Link your Heroku App to custom Google Domain</a></p><p><a href="https://www.jordangeorge.com/blog/how-to-set-up-google-domains-with-heroku-and-ssl-https/" target="_blank">How to set up google domains with heroku and and https</a><br><br></p>


<< Back to Blog Posts
Back to Home

Related Posts

How to deploy Dash/Python to Heroku
Nov 24 2020
Quick tips on how to deploy plotly dash by python to Heroku server. Also explore CICD from github



© DATAK 2024