Error 522 after setting up Cloudflare

Hello dears, hope you can help:

epiz_33052300 with website

Error Message

The error message is: Connection timed out Error code 522

Other Information

I just recently set up a free SSL with Cloudflare for my website. Cloudflare now says it protects my website and all SSL checks seem to be fine (with SSL-checker and dnssec-analyzer), but now the website is down with error 522?

I could see many posts in the forum about this error, but every time it was solved specifically, when some InfinityFree admin advised to remove a specific IP from their list or informed that some IP had been attacked… I wonder if someone can help me see what happens now with my case?

Als here my DNS records:


Adding a screenshot of the error message. I also notice that the IP mentioned at the bottom does not match with any of the DNS records on Cloudflare. Is that normal?

And, somewhere I read that it could have something to do with my .htaccess file… so here is what is in my .htaccess file

> RewriteRule ^(.*)$ $1 [L,NE,R=204]
> RewriteEngine On
> RewriteCond %{HTTP:X-Forwarded-Proto} !https
> RewriteCond %{HTTPS} off
> RewriteCond %{HTTP:CF-Visitor} !{"scheme":"https"}
> RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
> Access-Control-Allow-Origin: ""
> DirectoryIndex Login_AST2020.php index.php index.html index.htm index2.html
> ErrorDocument 403
> ErrorDocument 404
> ErrorDocument 500

Remove these

It should be pointing to


If CloudFlare is running on full mode, you do not need this as well



On top of what @KangJL said to do, also do the below:

Create the following records:

A @
A www


Thanks a to to you both!

I did exactly as you said and it now works!

Actually, I could only create the first of the records that Greenreader9 proposed. I would get this message upon trying to setup the second one (the www one)

Shall I not be worried? Will it work equally or do I not cover one of the nameservers then?

Remove the 4 CNAME records that you showed in your original screenshot, then try again.


That worked out :slight_smile:

One last question would be… what can I do to understand better what we have just done? I appreciate enormously the help, but I feel too dependant :slight_smile:
Where did you get the right IP’s to use ? how can I learn better what those records mean?

Anyhow, thanks for the provided help already!

Learn more about the DNS system :slight_smile:

I got I by querying the nameservers, but you can find it in the client area.

Basic run-through of the records is here:

Not a problem, glad I could help!


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