I own a bare (i.e., mydomain.com) Google domain. This domain directs to my Anvil app without problem, using an A record pointing to 52.56.203.177. However, when I attempt to set up www.mydomain.com by using a synthetic record to redirect www.mydomain.com to mydomain.com, I encounter the following error:
“This site can’t be reached www.mydomain.com unexpectedly closed the connection.
Try:
Checking the connection
Checking the proxy and the firewall
Running Windows Network Diagnostics
ERR_CONNECTION_CLOSED”
What am I doing wrong? Do I need to enter both mydomain.com and www.mydomain.com in the “Publish App” dialogue box using a comma to separate them?
$ curl https://www.mydomain.com/
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to www.mydomain.com:443
(In a web browser, the user is always directed to https:// because Anvil uses HSTS as part of our security model.)
I think it should be possible to configure the Synthetic Record to work over HTTPS, see this Stack Exchange question.
Alternatively, we can poke something manually our end to allow you to set up an A record for www.mydomain.com. This is something we’re happy to do for anybody.