Forwarding https://example.com to https://www.example.com - ssl

Trying to get
https://example.com
To not refuse the connection, to show my website, and to redirect to:
https://www.example.com
Without having to switch my DNS hosting to DNSimple or adding another service provider.
My domain was purchased on GoDaddy. DNS is on GoDaddy as well, set up as shown below.
My app is hosted on Heroku, using a Let's Encrypt certificate, that I installed following this answer.
Currently using Helmet+express-enforces-ssl to force hsts.
I have read the following info:
Heroku SSL on root domain ; Heroku SSL Endpoints ; The Limitations of DNS A-Records
The last of which states:
(...) applications requiring SSL encryption should use the
ALIAS/ANAME configuration on the root domain. Subdomain redirection
will cause a browser error when the root domain is requested over SSL
(i.e. https://example.com).
Which seems to be my problem (?).
How do I set this up on GoDaddy?

Related

Why won't my https://domain forward to www?

I have a website for my podcast built with Python / Django that is hosted on Heroku: https://dinpodcast.herokuapp.com/
I have a custom domain parked on GoDaddy, dinpodcast.com, that has a www CNAME directing to my heroku application. This works just fine: https://www.dinpoddcast.com
I wanted dinpodcast.com to redirect to the www website, so I have the following domain forwarding set up on Godaddy:
This also works great, for the most part. Now, when I enter http://dinpodcast.com, or just dinpodcast.com, both will redirect to https://www.dinpodcast.com.
Here's the problem. When I enter the naked domain WITH HTTPS, so when I enter https://dinpodcast.com into a browser's address bar, I get the following response:
Here's what I THINK is happening. My SSL certificate is provided by Heroku under their Automated Certificate Management program. So, I assume that since I don't have an SSL certificate with GoDaddy, it's timing out trying to find one before it can redirect to my www subdomain. Would this be correct? If so, is there any way around this WITHOUT buying an SSL certificate with GoDaddy? If that's not what's happening, then what is and how do I fix it?
When you create an ssl certificate in your domain do you include your root domain? Tried using this tool in your root domain and it seems that there is no ssl certificate. However the subdomain https://dinpodcast.herokuapp.com/ has one. I suggest putting an ssl certificate in all subdomain and root domain that you are using.
I also checked the root domain’s IP address using this tool and checked port 443 using another tool and apparently the port is closed. Double check your firewall and make sure 443 is open.

Why is my IONOS 1&1 root not redirecting correctly over ssl?

I have a 1&1 IONOS domain for my heroku app. the www subdomain works fine, with a CNAME setup for it. but I'm trying to redirect the root url to the www subdomain. this also works fine for http, but if the url is typed in as https://example.com, I get a ERR_SSL_PROTOCOL_ERROR (on chrome, other browsers have different errors). this is on any device, regardless of clearing cache and history etc.
my heroku logs show it's never reached, so it must be an issue within 1&1.
theres an ssl cert set on the domain with 1and1, as well as heroku's ACM.
any ideas?
To make the four URL variations (http://example.com, http://www.example.com, https://example.com, and https://www.example.com) point to a different SSL hosted site (heroku, cloudfront, etc), you need three things in IONOS:
Under DNS settings, add a CNAME entry for the www subdomain that points to your SSL hosted site (example.herokuapp.com)
Set up an HTTP Redirect under Domain Forwarding to https://www.example.com (don't check the box that states "Also set up for www subdomain")
Make sure you have an SSL wildcard certificate for *.example.com installed and attached to your domain in IONOS
It looks like all you are missing is number 3. After that, the redirect that you have setup should work as expected.
Note: example.com should be replaced by your actual domain in all of the above.

Heroku naked domains with DNS & SSL

I've been struggling with the configuration of my DNS app on Heroku. Things I want to accomplish:
www.example.com and example.com , both with SSL config (HTTPS)
Things I tried so far ...
GoDaddy Settings:
CNAME | www | example.com.herokudns.com
FOWARDING to
https://www.example.com
However, this setup is working great with HTTP only, but I'm getting a "Your connection is not private" error when I type the https.
I checked several tutorials and none address this issue.
PS: I'm using the SSL automatically managed from heroku.
SOLVED IT
Getting the naked domain set up with Godaddy easily: Set forwarding to your domain: https://www.my-domain.com. This will redirect non www to the correct place.
With that, I don't actually need to add a second domain in heroku (example.com).
Just keep the www.example.com, turn the SSL on, go to go daddy and redirect. This is working for me so far....

SSL certificate to cover subdomain sub.domain.com

I'm new to AWS server and I was recently handed a server to maintain. It freaks me out a little bit.
Let's say our domain is: abc.com and www.abc.com
I have already installed letsencrypt SSL certificate for these 2 domains. and they worked fine.
The problem now is that we need an unbounce page to divert traffic to a landing page (away from the buggy one we have on aws right now).
I, then, went on my DNSimple an reroute as follows:
abc.com URL www.abc.com
www.abc.com CNAME unbouncepages
--> abc.com and www.abc.com resolve to our landing page on unbounce
BUT, we still need the page we have set up on aws server.
At the moment, I have this configured on DNSimple:
sub.abc.com ALIAS xx.xx.xx.xx.xx (our AWS server public IP)
https://sub.abc.com will complain: This page is insecure (broken HTTPS).
My question is: How do I add SSL certificate to a subdomain on an apache AWS server?
Any suggestion is much appreciated

Root Domain Not Redirecting DNSimple

I currently have my application hosted on Heroku using an SSL. I purchased my SSL and setup the SSL endpoint and all works well using DNSimple.
The issue I am having is getting my root domain to redirect to my sub domain.
Currently our application is hosted only on the secured sub domain "example.website.com" and not on the root domain "website.com"
I have tried setting up an ALIAS, CNAME and URL redirect with DNSimple but every time I type in "website.com" I receive a Heroku Error: There is no app configured at that hostname.
Perhaps the app owner has renamed it, or you mistyped the URL.
If I type in www.website.com, it will successfully redirect to my secure sub domain url. Not sure why the root itself wont transfer
*SSL was NOT purchased as a wild card. It was granted a specific sub domain url
In DNsimple you should use a URL type to redirect website.com to example.website.com. Here is a working setting (this is the reverse of yours, ie www. to none www. address);
It could be that you are not waiting long enough for the changes to take effect.