23

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?

  • 2
    It's recommended that you redirect to www instead of trying to serve a site at the naked domain name. – Michael Hampton Aug 1 '14 at 16:12
  • 4
    I know, but like many other people I have sites that have been operating for a long time without the "www" and need to continue to do so. – alpheus Aug 1 '14 at 16:28
  • It's not usually that difficult to switch back. Don't let "SEO" concerns stop you. – Michael Hampton Aug 15 '15 at 6:31
19

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

0

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.

  • 2
    It's only been 9 days since February 2016. – MadHatter Mar 8 '16 at 14:19
3

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.

  • This was viable, provided you want to take your DNS settings outside of Google Domains, and have GD simply point to a different name server. My goal was to keep everything on Google Domains and @travisR's answer allowed that. – Miro Aug 22 '16 at 16:48
15

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.

  • This is not a great way to go because it will not "forward" an arbitrary URL path, it will only send you to the root www if you type any @ url. – tommybananas May 30 '16 at 18:50
  • 2
    This solution worked for my redirection of the apex domain. Google domains lets you specify whether to forward the path or not in the item setup, and the path is forwarding correctly for me. It does not handle https well,but we don't have a use for this yet, so not a problem. – Miro Aug 22 '16 at 16:46
  • 1
    @tommybananas -- Google Domains seems to allow for forwarding of path now. – BadPirate Nov 8 '16 at 20:53
  • They have also added https forwarding – maxm Oct 29 '18 at 22:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.