I created a staging subdomain for my site. I set up an a name for it and it was working. It stopped working. I can access the site by modifying my hosts file with the IP address. The site is working fine - the only problem is the subdomain.
I am sorry to hear you’re experiencing an issue with your domain/website while using Cloudflare.
Can you share what kind of error code you’re getting or a screenshot of the error you’re experiencing?
May I ask if the sub-domain is in form like sub.domain.com or www.sub.domain.com?
Before moving to Cloudflare, was your Website working over HTTPS connection and your sub-domains too?
May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?
So, you’re using your local hosts file to access your website/sub-domain?
You might find an issue, as far as if your sub-domain related DNS hostname is proxied , then you’d have an Cloudflare anycast IP - or multiple ones - shown on the lookup.
Therefore, your local hosts file would try to go (including your Web browser cache and possibly a cache at the DNS of your local ISP provider) to an “known” IP address instead of going for the new proxied one.
Despite, even if you figure out the new IP, it’s an anycast network, meaning it could change the in the next few days or so.
My best guess is, you’re using development website and IP access, and not having an proper and valid SSL certificate for your sub-domain, therefore possibly having an issues like described at the article from below:
Otherwise, some other issue might happen. Please provide some more feedback regarding this case in your next reply so we could troubleshoot further and help you find a proper solution.
similar issue which led me to this post.
primary site is hosted on Squarespace
created a Vultr VPS for hosting of other services
running nginx proxy manager on Vultr VPS and created a “test” subdomain which I can access via the Vultr IP but not the FQDN (A record created in Cloudflare).
It would seem as though I’ve missed something (granted I am handicapped by my learning curve)
Configure your virtualhosts file with SSL to make sure it’s served via HTTPS from the origin for your sub-domain
1.1. You could use Let’s Encrypt / Certbot, etc. for a sub-domain to get your ssl
1.2. Or you could use Cloudflare Origin CA Certificate
Disable SSL for your sub-domain at Cloudflare by using Page Rules and have insecure setup over HTTP only
Here is a way to re-check if you correctly setup the SSL for your domain with Cloudflare:
Regarding available SSL options at Cloudflare dashboard, check here:
If any other issues appear, follow the needed steps for troubleshooting from article below:
In case you do not have an SSL certificate, you can use Cloudflare SSL, if so, kindly make sure you follow the instructions as follows on the below article to setup an SSL certificate using Cloudflare Origin CA Certificate: