37

This functionality is required for properly directing a root domain to Heroku:

https://devcenter.heroku.com/articles/custom-domains#cname-functionality-at-the-apex

Some registrars, like DNSimple, support it. Is it supported by the new Google Domains?

alpheus
  • 515

4 Answers4

30

No, but you can have Google Domains forward your root domain to your www CNAME.

First create a CNAME in the Custom Records section pointing www to yourapp.herokuapp.com.

Then in the Synthetic Records section, choose Subdomain forward, enter @ in the subdomain field and www.yourdomain.com in the Destination URL field.

Save those and you're done.

29

No.

The full list of records supported by Google Domains can be found at:

https://support.google.com/domains/answer/3290350

There is no 'ALIAS' or 'ANAME' or any other similar pseudo-CNAME supported.

Please note that the type of record mentioned by the Heroku documentation is not an actual CNAME, but rather an A record that is auto-updated to match some arbitrary external A record. Amazon Route 53, as well as several other DNS providers offer this, and call it various things - some call it ALIAS or ANAME etc - but it is not an actual RR type.

Google domains does support a thing called "synthetic records", however AFAIK it would not help you with Heroku.

https://support.google.com/domains/answer/6069273

4

Cloudflare ended up working for me (free plan), check out http://www.higherorderheroku.com/articles/cloudflare-dns-heroku/. Their onboarding is great, they walk you through changing your nameserver and automatically apply some magic ("CNAME flattening") when you set a CNAME record for the root domain.

Jay
  • 141
  • 1
  • 2
-1

All the answers are correct that such is not possible.

But to add the hacks, I'm writing what I did:

I went to site24x7 and looked up the DNS to which I wanted to point to. It gives a whole list of IP addresses that the DNS points to. Then, I added an A record with all those address in the root domain.

This is totally free, very easy to configure but with one downside. Heroku, or whatever other provider you have, may choose to change all of those IP addresses and your setup will fail. This seems like a remote possibility as long as your site is live. I haven't faced it in the last few months- since February 2016.