First Level Subdomain Gets Error 522 When Using HTTPS, Root Works Perfectly

Hi All, my root domain works with https, but my subdomain clients.mydomain.com gets a 522 error when trying to access using https. It works fine when I access without https, any ideas?

Thanks!

Domain?

mydomain.com

You have the host configured on Cloudflare but it does not seem to respond to Cloudflare. Is it supposed to go to the same server as the main domain?

Hi Sandro

clients.perfectfuneralplans.com targets an s3 bucket, but the root domain targets a separate wordpress hosting account (I think godaddy).

https://clients.mydomain.com does not work
http://clients.mydomain.com does work

Thanks for your help.

In that case I’d assume your AWS host is not properly configured for HTTPS or blocks Cloudflare for some reason. Going directly to your AWS instance, can you open it on HTTPS?

I’m not able to access the aws bucket url via SSL, but I use the exact setup across many sites and do not have an issue.

The case is the same in all, that the bucket url is not accessable via SSL, but once setup with a CNAME and using Cloudflares SSL it does work.

http://clients.mydomain.com.s3-website.eu-west-2.amazonaws.com/
https://clients.mydomain.com.s3-website.eu-west-2.amazonaws.com/ doesn’t work, but this is the case in other setups I use, and the custom domain works fine with SSL.

e.g.

https://mydomain.com/ works fine
http://mydomain.com.s3-website.eu-west-2.amazonaws.com/ works
https://mydomain.com.s3-website.eu-west-2.amazonaws.com/ does not work

hope this makes sense

Whats your SSL mode? Assuming it is one of the Fulls you could either set it to Off or Flexible. If you dont want that domain-wide it should also be possible to have that specific for the clients host via a page rule.

Ah switching it to flexible has made it work! Why that would be the case?

Thanks so much for your help

Because in that case Cloudflare will connect to your server via HTTP regardless of how the client connects to Cloudflare.

Ah brilliant thanks for your help!

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