Heroku custom domain ssl name mismatch error - ssl

I've added a custom domain (bought on GoDaddy) to my Heroku app and am on the hobby dyno. When I type in www.example.com everything works fine, but when I open example.com I get a name mismatch error.
My cname host www points to example-78914389.herokudns.com and I have forward to https://www.example.com on GoDaddy enabled.
The certificate is only valid for the following names: shortener.secureserver.net, www.shortener.secureserver.net.
Why is the certificate valid for these domains and not for my example.com?
I don't know if it matters, but I just ported the domain from zeit now to GoDaddy.

Problem solved!
I transferred my domain from GoDaddy to namecheap, then made an ALIAS record. I've also added example.com to my app in Heroku. I now have www.example.com and example.com added and both domains work.
If you have the same issue, check this out: https://devcenter.heroku.com/articles/custom-domains#add-a-custom-root-domain

Related

SSL certificate is not working for subdomain with www

We are running our website on IIS. In the domain settings, example.com and www.example.com are pointing to same IP Address.
The website works fine for https://example.com and https://www.example.com and https://stage.example.com
but for:
https://www.stage.example.com
We are getting Not Secure error.
Is it related to how SSL certificate is setup?
Added http & https bindings in IIS for both stage.example.com and www.stage.example.com
If you have a non-www and fully-qualified domain name of the same domain, a single domain (standard) SSL certificate would be enough to cover both. However, if you have multiple subdomains that you need to cover, then you need a wildcard SSL certificate.
For example:
Scenario 1: If you want to secure only two versions of your domains — domain.com and www.domain.com — a single domain SSL would be fine.
Scenario 2: If you want to secure the first level of subdomains (other than www.domain.com) — such as mail.domain.com or test.domain.com — a single domain SSL will not be enough. You must buy a wildcard SSL certificate

Setting up SSL on Domain.com

I currently have a domain from domain.com. I have a heroku domain name and a dns target. I have also enabled the free ssl on domain.com.
Example:
Heroku: domain: www.test.com DNS Target: crazytarget.herokudns.com
Domain.com: Record: CNAME, Name: WWW, Content: crazytarget.herokudns.com
Note: This works for non-https.
I uploded a .htaccess file onto heroku so now the heroku domain is served at https://path.herokuapp.com.
This domain name cname does NOT pick up the https version of the site.
My question is: How do I get my domain to use https? I dont see how to do this anywhere.
I had to setup SSL on the Heroku end. :(

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....

How to handle two domains and forward everything (non www and www) to one Heroku app?

I have 2 domains, one at Register.com and one at Godaddy. I need them both to point to one Heroku app, and the following scenarios to work:
http://domain1.com
http://domain2.com
http://www.domain1.com
http://www.domain2.com
https://domain1.com
https://domain2.com
https://www.domain1.com
https://www.domain2.com
All of the above should all end up at one heroku app at https://www.domain1.com
Being that it's Heroku, I have no access to the .htaccess, and I've heard you're only allowed one SSL cert per app. I also have forwarding setup at GoDaddy, but apparently forwarding does not work if you try to forward from https on a non-hosted app.
Your cert has to match the domain name that the client will try to answer, this means that when you make it the Subject Alternative Names (SANs) have to include www.domain1.com, domain1.com, www.domain2.com, domain2.com, and the domain/ip of your actual heroku app.
For your DNS records, if the heroku app is at a Fully Qualified Domain Name (FQDN), and not an ip then follow these steps:
Forward your root domain, e.g. example.com to www.example.com, and make the CNAME record www. 300 IN CNAME domain.of.heroku.app
If the heroku app is reachable at a static ip follow this:
Make an the following A records for both your domains:
# 300 IN A ip-here

Wildcard SSL on ACM but doesn't work on subdomains

*.example.com, example.com, www.example.com - SSL - Issued by Amazon.
SSL installed and setup with ELB. Accessing the domain via example.com and www.example.com works with SSL perfectly. Yet when any sub domain(Subdomain.example.com) is accessed, SSL fails.
Subdomains are generated via a route.php script. Subdomains are dynamic.
Forcing SSl doesn't work. Tried other methods via .htaccess and its failing.
Does ELB work with wildcard SSL ? How do i fix these problem?
Thanks
I found the solution.
Add *.example.com to ElB with A record alias in route 53.