DNS with Heroku and Google Domains - SSL Forwarding

I host the site on example.herokuapp.com. I own a domain example.comin Google domains (registrar). I also have a GSuite setup for this domain (email).

I would like to forward everything to https://wwwor https://.

So far, I can get:

[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/

In Google Registrar, I have:

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. 

Launch heroku domainsgives me

www.example.com  www.example.com.herokudns.com
example.com      example.com.herokudns.com

Launch heroku certs:autogives me

www.example.com  DNS Verified
example.com      Failing

How do I get two failed urls?

My hypothesis: I need another CNAMEfor example.com.herokudns.com, but I can not add it for @.

+6
source share
1 answer

I got this to work with the following steps:

1) Heroku: > : SSL, -

2) DNS, : www.sitename.com.herokudns.com

3) Google DNS " "> " DNS". . , , , Google DNS . website.com.website.com → https://www.website.com. , , SSL.

4) - : www, CNAME, TTL: 1h, : DNS Target, 2.

website.com http://website.com, https://www.website.com. www.website.com .

!

+2

Source: https://habr.com/ru/post/1680345/


All Articles