0

I am trying to setup custom domains for my SSL enabled Heroku application on AWS Route 53.

I have added custom domains (the root and www sub domain) to my heroku application via the CLI. The custom domains and their DNS targets show up fine on the heroku dashboard.

I have a domain registered with GoDaddy for which I am using Route 53 as the DNS provider. I have updated the nameservers on GoDaddy to be the Route 53 provided nameservers (under the Route 53 zone named as the root domain).

I have also imported the zone file given by GoDaddy into Route 53. I removed the A record which came with the zone file and the CNAME record which pointed to @. I also haven't changed the NS and SOA records supplied by Route 53.

To setup custom domains on my Heroku application, I have created a CNAME record on Route 53 (simple routing) for the www subdomain pointing to the corresponding DNS target given on the Heroku dashboard. This has a TTL of 86400.

For the root domain, I can't add a CNAME record so I had created an A record with the IP addresses for the root domain target on Heroku resolved by WhatIsMyIPAddress with a TTL of 86400. I removed this record later since Heroku says static IP addresses are bad.

The problem is that when I go to www.my-website.com, the correct website loaded, but without https by default. I had to manually type it in. Now the web browser started showing connection closed unexpectedly again, as it did before.

I'm not sure why this is happening. Even on the Heroku dashboard, the ACM status shows as OK for both domains. I don't think it has updated yet for the root domain since I removed the A record on Route 53.

I looked around on Google and SE, but found nothing which can help.

Question: How can I setup both the root and www domain on Route 53?

My main concern is why is my www sub-domain behaving unexpectedly. I have followed the setup process for a subdomain to the letter (as far as I know). And I am not setting up a root domain for the time being.

This questions was originally on SO and there this article was listed in the comments Heroku Root Domain Problems. I did look at that support article. However, they don't mention anything about Route 53. GoDaddy is where my domain registration is, my DNS hosting is with Route 53.

The heroku docs say that a CNAME record will suffice for a subdomain, and Route 53 is also happy with that config.

I did in fact get proper routing on the subdomain, it just stopped working completely now.

Stuggi
  • 3,366
  • 4
  • 17
  • 34
  • Anyone? Any pointers would be appreciated. – StackMatch Nov 12 '20 at 05:09
  • "The problem is that when I go to www.my-website.com, the correct website loaded, but without https by default." HTTP to HTTPS redirects have nothing to do with DNS. You're responsible for that bit, either at the webserver config level, or in your application. – ceejayoz Aug 07 '21 at 00:13

0 Answers0