How to set up ssl on heroku app with a GoDaddy domain - ssl

I have a herokuapp running with a GoDaddy custom domain, and I am trying to add an ssl. I followed the Heroku tutorial by upgrading to a hobby dyno and clicking on "configure ssl." I then chose the automatic option, and it told me to replace the DNS www.example.com with a long string that Heroku provided, but I am not sure where to do this. GoDaddy does not allow me to change the address to the string because it does not begin with www. Has anybody set up an ssl for a herokuapp with a GoDaddy custom domain who has experience with this?

I did it a while back.
I set up the SSL on Heroku by upgrading the dyno to paid and used their SSL. The hard part would just be connecting GoDaddy and Heroku together.
All you need to do is go to Heroku and add a custom domain and copy the DNS.
Go to your DNS settings in GoDaddy and create a new record.
Type = CNAME
NAME = WWW
Points to = [DNS FROM HEROKU]
That should be all.
You should have something like this:

Related

SSL not working with custom domain through Heroku and PointDNS

Currently hosting a PHP site on Heroku with a custom domain site that I bought through Hostgator. I've followed this https://stackoverflow.com/a/47930979/4470851 to get PointDNS set up for my custom domain, and this guide https://devcenter.heroku.com/articles/custom-domains to get the DNS Targets- I've set the given DNS targets as the CNAME alias through Hostgator, and now the custom domain is working, but I'm getting the insecure site warning through Chrome. I upgraded my Heroku Dyno to be a Hobby plan (per https://devcenter.heroku.com/articles/automated-certificate-management) so Heroku should be handling my SSL now. I'm getting the Firefox warning: "The certificate is only valid for the following names: *.herokuapp.com, herokuapp.com ".
This is not for a subdomain.
Got this working- for anyone else in the same boat, I had to also apply the DNS targets Heroku provided into the CNAME and ALIAS sections in PointDNS (they were set as .herokuapp.com addresses).

SSL certicicate not working in cpanel

Im using hostgator as my host.They do not provide free ssl certificate.So im using cloudflare free ssl certificate for my site.SSL certificate working everywhere except Cpanel.
I tried manually adding ssl through cpanel option.But not really working!Is there any way i can add it there?
Or it will be really good if my cpnael url cpanel.site.com won't just show up to that address.
If you want to use the CloudFlare SSL certificate then there is no need to add that SSL certificate to yoru cpanel nor to your site. Read the cloudflare documentation in order to see how to create and use Page Rules and their SSL certificate. cPanel has nothing to do with it. CF works just fine with cPanel/WHM and pretty much with any other related hosting panel. Your site can be http only in cPnel and then you do the HTTPS redirection from Clouflare using their Flexible SSL and page rules
cpanel.yourdomain.com ssl is related to server side. If your host allow autossl with Let's Encrypt (for example) then it will install ssl for all your necessary subdomains like webmail, cpanel, mail, www etc. If you are installing ssl manually, then you cannot install it for cpanel subdomain. However if you want to use cpanel securely and have enabled ssl with yourdomain.com the you can use it:
https://yourdomain.com:2083

1and1 SSL Certificate with Heroku App

Could someone walk me through how to set up the SSL Certificate that I bought through 1and1 with my Heroku application and my 1and1 domain?
I am able to set it up and it stays active for a few minutes but then goes back to saying unsecured.
Let's call my domain harrison.com. I have a subdomain www.harrison.com. Let's say my heroku app is harrison.herokuapp.com.
What i'm currently doing is changing harrison.com to redirect to www.harrison.com and then changing that cname to harrison.herokussl.com which is currently not working.
Any help would be appreciated.
I believe that I have finally solved this.
I continued to redirect my TLD to the subdomain www, then then set the CNAME of the subdomain to www.my_app_name.com.herokudns.com. After that, I combined the server certificate (obtained from my DNS, 1and1), with the immediate certficate (also from 1and1) into 1 file with a .pem extension.
Finally, I uploaded the .pem certificate and the .key key to Heroku.

SSL on wildcard subdomains with CloudFlare and Heroku

I'm working on a Ruby on Rails SaaS app with a custom subdomain for each company. When a company signs up, the user is redirected to her subdomain.myapp.io.
The app is hosted on Heroku and DNS are managed at CloudFlare. I use the free SSL feature provided by CloudFlare, which works as expected for https://myapp.io.
My issue is about having SSL active for the subdomains. I wonder if this is possible without buying a wildcard SSL certificate.
CloudFlare DNS setup:
myapp.io. 300 IN CNAME myapp.herokuapp.com.
*.myapp.io. 300 IN CNAME myapp.herokuapp.com.
Heroku domains setup:
myapp.io
*.myapp.io
This works, but without SSL on subdomains. It is not possible to use CloudFlare features (such as SSL Full) for wildcard subdomains (except for Entreprise plan users).
I think I need to buy a wildcard SSL certificate for my domain ($115/year) and add the SSL Endpoint Heroku add-on ($7/month). Am I wrong?
Short answer:
You can't have a free wildcard SSL (Full protection) for subdomains on CloudFlare (Free plan).
Long answer:
I mean using wildcard with CloudFlare (Free plan), CloudFlare proxy protection and acceleration are bypassed (no orange cloud) so your origin server SSL certificate will be used instead. So to enable SSL you need to add a CNAME record for each subdomain (the cloud icon should be orange).
Example:
foo.myapp.io. 300 IN CNAME myapp.herokuapp.com.
bar.myapp.io. 300 IN CNAME myapp.herokuapp.com.
(You don't need to add any record for custom domains in Heroku if you already have *.myapp.io)
[EDIT]
Maybe you can add DNS records dynamically via CloudFlare's API (https://api.cloudflare.com/#dns-records-for-a-zone-create-dns-record)
(I didn't try that...)
Workaround:
As you said:
Pay for CloudFlare Enterprise
Buy a wildcard SSL certificate + Heroku SSL SNI (https://devcenter.heroku.com/articles/ssl-beta)
Hope it will help.

SSL certificate on Heroku

I have one domain purchased from GoDaddy.
lets say it is www.example.com, I have purchased wild card SSL certificate from GoDaddy for this domain.
This domain is pointing to one of my app on Heroku. When I type http://www.example.com, it is working fine. But when I type https://www.exapmle.com,
It says "web page not available" and error code is:
"ERR_CONNECTION_REFUSED".
So do I need to add SSL certificate on Heroku too? How https will work on my site when it's pointing to Heroku? Thank you in advance.
You need to upload your SSL certificate to Heroku with its CLI command heroku certs:add. Probably you also need to activate an SSL Endpoint addon ($20/month) and set your DNS CNAME pointing to it.
See https://devcenter.heroku.com/articles/ssl-endpoint#provision-the-add-on for details, and subsequent sections.