Having 523 error when accessing my site from Safari Browser

Answer these questions to help the Community help you with Security questions.

What is the domain name? libello.co

Have you searched for an answer? Yes

Please share your search results url: https://community.cloudflare.com/t/origin-is-unreachable-error-code-523/479708

When you tested your domain, what were the results? It opens up on other browsers aside Safari

Describe the issue you are having: I migrated from Heroku to AWS in December, then I also migrated the DNS from where I purchased the domain originally to Cloudflare. I configured https on the Ec2-Instance using cloudflare using this link as a guide https://medium.com/geekculture/configure-https-on-aws-ec2-for-free-using-cloudflare-e7120e9a6856 .
I then also install ssl certificate on the ec2-instance and added the path to the Nginx config using this guide https://awswithatiq.com/ssl-setup-on-amazon-linux-2023-using-nginx-and-letsencrypt/. Now when I go to the domain libello.co, it redirects to https version of the domain. But on Safari, I get the 523 error code unless I first try to access the domain via https on safari, then subsequently the auto redirect works when I try the domain without https.

However during debugging, I found that if I access the site via the public IP of the ec2-instance, after redirect to https, the ssl certificate shows Certificate is invalid and the Issued To is codeloopz while the Issued By is *

But if I access the same site via the domain libello.co, after redirect to https, the ssl certificate is valid and the Issued To is libello.co while the Issued By is GTS CA 1P5

So I don’t know how the ssl on the public IP is using another ssl and I don’t know how to make it use the ssl attached to the domain libello.co

What error message or number are you receiving? 523 error code

What steps have you taken to resolve the issue?

  1. I have checked the server to trace where the ssl showing on the public IP is installed

Was the site working with SSL prior to adding it to Cloudflare? Yeah it was when it was when the site was on Heroku. I created the ssl using heroku tools. But I have disabled the ssl since I have moved to AWS

What are the steps to reproduce the error:
On Safari

  1. Go to the domain libello.co, the error would show

Just to compare the results on different browsers

On Chromium Browsers

  1. Go to the public IP of the ec2-instance 18.133.138.181
  2. Check the ssl details from the browser.
  3. Go to the domain libello.co on another tab and check the ssl details on the browser

Have you tried from another browser and/or incognito mode? Yeah, I tried in private browsing on Safari and that error didn’t show up. The redirect worked fine. No issues

Please attach a screenshot of the error:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.