Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku Custom Domain SSL Warning

I'm trying to set up a GoDaddy-purchased custom domain for my Heroku Deployed app. I got it to work so that the www._.com forwards correctly to my herokuapp (cedar), but 1) my attempts to get the naked address haven't worked, and 2) when I attempt to log on to the custom domain for the first time, I get a browser-dependent version of this warning, which I definitely don't want:

"This is probably not the site you are looking for! ... You should probably not proceed... In this case, the address listed in the certificate does not match the address of the website your browser tried to go to. One possible reason for this is that your communications are being intercepted by an attacker who is presenting a certificate for a different website, which would cause a mismatch. Another possible reason is that the server is set up to return the same certificate for multiple websites, including the one you are attempting to visit, even though that certificate is not valid for all of those websites. Google Chrome can say for sure that you reached *.herokuapp.com, but cannot verify that that is the same site as which you intended to reach. If you proceed, Chrome will not check for any further name mismatches."

The HTTPS before the custom address is crossed out in red. Obviously, I don't want to scare visitors away with this warning, but I also don't want to have to buy an SSL certificate through GoDaddy. I don't really need SSL encryption. Any idea how to forward the naked site and get this to work without scaring off visitors?

Thanks. I know this is a sort of vague question and not Stack Overflow's specialty, but I've fished around google/Heroku help/GoDaddy and found very little up-to-date info that could help me sort through all this.

Sasha

like image 997
Sasha Avatar asked Oct 06 '12 23:10

Sasha


People also ask

Does Heroku allow custom domain?

You can buy a custom domain name with a domain registration service. Add the custom domain to your app with the heroku domains:add command. Look up the Heroku-supplied DNS target for the custom domain using the heroku domains command. Configure your app's DNS provider to point to the Heroku-supplied DNS target.

Does Heroku require SSL?

All Heroku Postgres client connections require SSL.

Does Heroku provide free SSL certificate?

By default, Heroku provides free Automated Certificate Management (ACM) for all applications running on paid dynos. If you want to use a wildcard certificate or a different certificate authority for your application, follow these steps to acquire a certificate manually.

How do I enable SSL on Heroku?

Installation via Heroku Dashboard To install the certificate in your Heroku Dashboard, open the certificate, select the necessary application from the list, and select Settings. Then, scroll down the page and click on Configure SSL in Domains and certificates section.


2 Answers

Thanks mc6688. Tried zerigo. I needed my app to be reached from root domain as well as from subdomain like www. And zerigo solves that.

However Sasha`s problem is not related with DNS but SSL. There are two ways to solve this problem depending on your needs:

  1. If you are ok using http then in your app's environments/production.rb there must be following configuration config.force_ssl = false which by default is true. Change it to false. If Firefox still complains then reset it. Other browsers should be ok.

  2. But if you need https then you have to use your own (and not heroku`s) certificate through SSL addon which is paid service.

like image 167
Renars Sirotins Avatar answered Nov 26 '22 03:11

Renars Sirotins


Are you forwarding traffic from your domain to yourapp.herokuapp.com?

Not sure from your question if you fully understand the difference between forwarding and using your own name servers (DNS).

I'm guessing the reason your getting the https error is because you're forwarding to https.

I'd use the zerigo add-on, it really simplifies everything. Instead of using forwarding, you'd point your domain to Zerigo's DNS.

https://devcenter.heroku.com/articles/zerigo_dns

like image 20
mscccc Avatar answered Nov 26 '22 03:11

mscccc