I'm running a website on Heroku, with a custom domain name registered by my client through Network Solutions. The site runs over regular HTTP and SSL.
Due to its distributed nature, Heroku requires custom domain names to point to its servers using CNAME DNS records, aimed at www.example.com, rather than apex A records, pointed at a specific IP address. Because of this, the site needs to redirect the apex domain to the www subdomain; http://example.com
becomes http://www.example.com
. Also, https://example.com
needs to redirect to https://www.example.com
.
Everything appears to be set up correctly on the Heroku side according to their documentation (https://devcenter.heroku.com/articles/ssl-endpoint). On the Network Solutions side, where the DNS is configured, there is a CNAME wildcard record pointing all subdomains to Heroku's SSL endpoint address:
CNAME * example-1234.herokussl.com
To make the redirect work from the apex domain to the www subdomain, I'm following directions Network Solutions provides: http://www.networksolutions.com/support/how-to-forward-your-network-solutions-domain-name-to-a-free-blog-service/. This results in the following A record:
@ none 205.178.189.129
As a result of all this, http://example.com
is correctly redirecting to http://www.example.com
. However, https://example.com
not only doesn't redirect, it times out:
% curl -kvI https://example.com
* About to connect() to example.com port 443 (#0)
* Trying 205.178.189.129... Operation timed out
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
Connecting via HTTP does work, though:
% curl -kvI http://example.com
* About to connect() to example.com port 80 (#0)
* Trying 205.178.189.129... connected
* Connected to example.com (205.178.189.129) port 80 (#0)
> HEAD / HTTP/1.1
> User-Agent: curl/7.20.0 (i386-apple-darwin8.11.1) libcurl/7.20.0 OpenSSL/0.9.7l zlib/1.2.3 libidn/1.15
> Host: example.com
> Accept: */*
>
< HTTP/1.1 302 Moved Temporarily
HTTP/1.1 302 Moved Temporarily
< Content-Length: 0
Content-Length: 0
< Location: /?3e3ea140
Location: /?3e3ea140
<
* Connection #0 to host example.com left intact
* Closing connection #0
So Network Solutions' special redirect magic seems to work for HTTP, but not for SSL. Does anyone know if they support such a redirect at all, or am I going to need to convince my client to move to a new registrar/DNS provider?