The domain softhardsystem.com is hosted on Cloudflare Pages and the DNS is managed by Cloudflare. I want to use WordPress as a headless CMS. So, I have added the wp.softhardsystem.com subdomain to InfinityFree to host WordPress. I have two NS records pointing to ns1.epizy.com and ns2.epizy.com in the Cloudflare dashboard. I have also installed WP using cPanel Softaculous. But after a successful installation, I see that I can’t access wp.softhardsystem.com. It is showing ERR_SSL_PROTOCOL_ERROR. I think it’s related to SSL but how can I solve the error.
What is your ssl setting on CloudFlare? If it is “Full”, you will need to add a self-signed ssl certificate through the InfinityFree cPanel. You cannot use “Full (Strict)” on InfinityFree.
It looks like you do not have any SSL on your subdomain.
How can I set up a SSL certificate from the cPanel? My current SSL setting on CF is Full (Strict). I have experimented by changing it to Full, Flexible and even Off (not secure). But none of them works. I think I’ll have to install a SSL cert first. But how can I do that from cPanel > SSL/TLS ? It asks for Key, CSR and Certificate. And if I fill up them using the values I get from Cloudflare > SSL/TLS > Origin Certificate > Create Certficate, it gives an error that The certificate is not for wp.softhardsystem.com (Cloudflare Origin Certificate was seen). What should I do now?
Go through the same process that you did for the CloudFlare certificate.
Go to dash.cloudflare.com and change SSL mode to Full. The reason you cannot use Strict is because of
because the cPanel does not support a common name that is not the domain name.
I just tried what you said. But instead of creating a self-signed cert I installed a ZeroSSL certificate. It has been installed successfully. I have received a Private Key and a Certificate. But when I paste them in the fields by going to cPanel > SSL/TLS, I’m getting an error. The certificate you have entered does not match the current private key.. What should I do now?
I copied the key and pasted it. I have also tried re-pasting them. So, there’s technically no way that I have copied the wrong key. I didn’t use a self-signed cert for the cons it has. But if there’s no other way I will try that.
Thank you @wackyblackie for your help. It’s working now. I forgot to click on the Upload Key button! Now, I can access wp.softhardsystem.com. And I have selected Full in the CF dashboard.