Hi, @rbatista191. The error in this case is caused by this incorrect configuration in your screenshot.
To be clear, this is not a bug at Netlify nor a bug in Cloudflare. It is a bug in the configuration you made at Cloudflare. You caused the 522s.
Those are not IP addresses that Netlify is using. They likely were at one point but not anymore. You should never hard code an IP address Netlify uses into Cloudflare as those IP addresses can and will change without notice.
You should be connecting to your site’s subdomain at <site name here>.netlify.app
and not to an IP address.
Now, Cloudflare does require an IPv4 address for apex domains in which case you should use the load balancer IP address found in the external DNS documentation:
That IP address is quoted below:
If your DNS provider does not support ALIAS, ANAME, or flattened CNAME records, use this fallback option.
- Find your DNS provider’s DNS record settings for your apex domain, such as
petsofnetlify.com
.- Add an A record. Depending on your provider, leave the host field empty or enter
@
.Point the record to Netlify’s load balancer IP address:75.2.60.5
.
Actually, Cloudflare does allow you to set a CNAME on the apex when proxying. So you should use the <site name here>.netlify.app
CNAME target for the apex as well.
So, in your case, @rbatista191, the root cause was not Netlify and not Cloudflare. The root cause was you not configuring the proxying at Cloudflare correctly.
I am guessing that may others here have done the same thing (hard coding IP addresses guaranteed to change over time instead of using the equivalent of the external DNS instructions at Cloudflare).
EDIT: Recommending the CNAME for the apex as well.