How to resolve Cloudflare DNS Error 526 on Heroku? - ssl

I have a web application running on Heroku that is experiencing some unusual behaviour. My DNS is CloudFlare and I'm running CloudFlare SSL certification that is Manually added to Heroku.
The problem is subtle at first. It looks like when I visit the root domain youworkremotely.com on a new browser or device I initially get an Error 526. However, If I subsequently visit www.youworkremotely.com I am able to enter the site and proceed as normal. The odd behaviour begins when I attempt to revisit the root domain youworkremotely.com I no longer see the Error 526 and it is redirected to www.youworkremotely.com.
Any of you guys/girls understand what is happening and can help me fix the issue?

This has been resolved.
Initially the A record still pointed to the old IP address from the previous DNS provider but the CNAME record pointed to the correct heroku DNS URL. Updating the A record to the heroku provided DNS URL resolved the issue.

Related

Having trouble setting up SSL with Heroku + Namecheap

I'm trying to setup SSL for my website which is hosted on Heroku. So I clicked on the Configure SSL button and selected Automatic Certificate Management (ACM) and clicked next. It didn't give me any prompt after that but it now says that my certificate is automatically managed. Right under the SSL Certificates section, it shows the domains and it even says Your app can be found at https://www.example.com but when I try to visit the secure version, it gives me an error NET::ERR_CERT_COMMON_NAME_INVALID.
Do I have to change anything regarding my DNS on the Namecheap side? So far all I have is a CNAME Record with the host set to www and it points to heroku-generated-name.herokuapp.com. and a URL Redirect Record with the host set to # and the value is http://www.mywebsite.com.
I searched online and one answer was to change the CNAME record to heroku-generated-name.herokudns.com. instead of keeping it heroku-generated-name.herokuapp.com.. I did this but then suddenly I started getting other errors like DNS_PROBE_FINISHED_NXDOMAIN whenever I tried to visit the page so I quickly changed it back. I'm not sure if it matters but I did notice that after I changed it to *.herokudns.com., the URL Redirect Record was deleted so I'm not sure if that had anything to do with it. I didn't try messing with it any further so I just changed it back to *.herokuapp.com. and re-added the URL Redirect Record
Any help will be appreciated!

How to setup web app with custom domain name as SSL on heroku?

I have a web app and trying to host it on Heroku. I also bought the domain name on name.com. Everything works locally just fine. It also works with URL "app.herokuapp.com." But when I add DNS mapping, enable SSL, and try to go by my link, I have an error that IP is not found. Can anybody say what I did wrong?
UPD: Okay, I did everything one more time, and now it works, but only with HTTP, even though I enabled automatic SSL.
Screenshot:
Thanks a lot. I managed to solve my problem. I don`t know where the issue was, but I just removed all records from DNS in Heroku settings and added it one more time. And added default SSL support. Everything works.

Heroku ACM SSL works for .herokuapp.com but not real domain

I've followed the guide here for SSL to be automatically configured on my site. It does have the certificate when I visit mysite.herokuapp.com. When I go to my real domain, mysite.com, the site is completely reachable but doesn't seem to have the certificate. I'm pointing the DNS entry to the exact result of 'heroku domains'; note that this entry has not changed since I added SSL it seems. It ends in a .herokudns.com not .herokuapp.com or herokussl.com like I've seen in some of the previous answers on Stack Overflow. I assume that Heroku recently changed this requirement for setup.
I've already waited a few hours. I assume I must be doing something wrong, but I think I've followed the guide correctly, and there are so few steps, so I'm at a loss...
As Chris pointed out in the comments, the solution was heroku is doing something which prevents normal redirection of http to https. This post is very helpful for node js:
https://jaketrent.com/post/https-redirect-node-heroku/

Websites on server redirected to defaultwebpage.cgi after AutoSSL change

I had AutoSSL by Comodo on my CentOS WHM VPS previously configured and running. After the certificates got expired, I installed Let's Encrypt and tried to renew certificates via that service which failed with error that signified a DCV validation issue due to me to using the server's DNS. Also the HTTP validation was failing too.
Later, I switched back to Comodo AutoSSL and renewed two of the sites while all others failed with same error above.
Now the issue that persists is that I can't access the websites except one (the main account on WHM). All of the sites are showing defaultwebpage.cgi
What might possibly be the issue and what can be done to get the system back up?
Finally got the issue solved. The faults on my setup that made the DCV to fail were (different for different domains).
For a few domains, the DNS had AAA records(with IPV6 values) that prevented the updation.
For another domain the issue was that the DNS was on cloudflare and it wasn't getting auto updated. So, i had to manually enter the record that has name '_cpanel-dcv-test-record' and a value that had a data like '_cpanel-dcv-test-record=UF0zA7G97dxugw_u10XVpkRJ0faQg2bk2UHf2vDJkhKcElawaQqyaLtCL3VsquAGxv' (sample values for reference. not real)
I made the above changes, selected the domains (Inside CPanel for individual account > SSL > SSL Status) that needed the change and pressed the 'Run Auto SSL'.
Hope this helps someone who goes through a smilar situation.

Cname redirect to heroku?

I have an application on Heroku. I cname-redirect https://login.zenconomy.se to https://boomeranglogin.herokuapp.com/
I get the following (yellow) error in chrome:
This is probably not the site you are looking for!
You attempted to reach login.zenconomy.se, but instead you actually reached a server identifying itself as *.herokuapp.com. This may be caused by a misconfiguration on the server or by something more serious. An attacker on your network could be trying to get you to visit a fake (and potentially harmful) version of login.zenconomy.se.
You should not proceed, especially if you have never seen this warning before for this site.
Why?
If you want to use SSL and HTTPS on Heroku with a custom hostname (like login.zenconomy.se), you have to purchase the SSL endpoint add-on, get a certificate and configure the setup as described on Dev Center.