CNAME

To achieve the goal of making your web application accessible via a custom subdomain ( subName.yourDomain.com ) instead of the default URL provided by Heroku (‘https://abc-dev-d13413412341234123.herokuapp.com/login’), you can follow these steps:

1. Set Up the Custom Domain on Heroku:

Before configuring the DNS on InMotion Hosting, you need to add the custom domain to your Heroku application.

  1. Log in to Heroku:
    • Access your Heroku dashboard and navigate to the application you want to configure.
  2. Add Custom Domain:
    • Go to the Settings tab for your application.
    • Scroll down to the Domains section.
    • Click on Add domain and enter subName.yourDomain.com
    • Heroku will provide you with a DNS target (it will look similar to darwinian-egret-1u2341341341.herokudns.com).
  3. Copy the DNS Target:
    • Copy the DNS target provided by Heroku, as you will need this to set up the CNAME record in your DNS.

2. Configure the DNS on InMotion Hosting:

Next, you need to set up a CNAME record in InMotion Hosting to point dev.remclouds.com to the Heroku application.

  1. Log in to cPanel:
    • Access your InMotion Hosting account and log in to cPanel.
  2. Go to DNS Zone Editor:
    • In the Domains section of cPanel, click on Zone Editor.
  3. Add a CNAME Record:
    • If subName.yourDomain.com does not already exist:
      • Click on +CNAME Record next to your main domain (yourDomain.com).
      • For the Name, enter subName (it will automatically append .yourDomain.com ).
      • For the CNAME, paste the DNS target you copied from Heroku (e.g., darwinian-egret-1dfadfa213412342r.herokudns.com).
      • Set the TTL to 3600 seconds (1 hour) or leave it as the default.
      • Click Add Record or Save.

Important: Need to remove all A records that associated with the subName.yourDomain.com

Leave a comment

Your email address will not be published. Required fields are marked *