使用Heroku和Google Domains的DNS - SSL转发

woo*_*pav 6 dns cname heroku heroku-ssl google-domains

我正在主持一个网站example.herokuapp.com.我example.com在Google Domains(注册商)上拥有该域名.我也有这个域的GSuite设置(电子邮件).

我想将所有内容转发给https://www或者https://.

到目前为止,我可以得到:

[Failure] https://example.com/ -> "This site can’t be reached" Chrome error page
[Success] http://example.com/ -> https://www.example.com/
[Success] https://www.example.com/ -> https://www.example.com/
[Failure] http://www.example.com/ -> http://www.example.com/
Run Code Online (Sandbox Code Playgroud)

在Google Registrar中,我有:

Name Servers 
  Use the Google Domains name servers

Synthetic records
  example.com -> https://www.example.com (302)

Custom resource records
  NAME |  TYPE | TTL |                          DATA
  -----+-------+-----+------------------------------
     @ |    MX |  1h |         10 aspmx.l.google.com. (and others) <- mail
   www | CNAME |  1h | www.example.com.herokudns.com. 
Run Code Online (Sandbox Code Playgroud)

跑步heroku domains给了我

www.example.com  www.example.com.herokudns.com
example.com      example.com.herokudns.com
Run Code Online (Sandbox Code Playgroud)

跑步heroku certs:auto给了我

www.example.com  DNS Verified
example.com      Failing
Run Code Online (Sandbox Code Playgroud)

如何让两个失败的网址工作?

我的假设是我需要另一个CNAME,example.com.herokudns.com但我不能添加一个@.