What happen when server returning error?


What happen when the server (the original website server) returning error, let’s say it’s returning 500 internal server error, will this be cached by CF and served to visitor? Or CF will try to fetch again? If it will fetch again, how long is the interval?

Another question, site A is connected to CF, after 1 week I change my hosting, will I need to reconnect to CF or CF will automatically connect to the new server?



If the origin Ip address changes you’ll need to modify your DNS record in Cloudflare to point to the new host. We have no way to know where to direct traffic unless you tell us.

We do cache some error responses (such as a 404). The length of time depends on the response. More information is available here:


Ok, then I’ll ask again when I really changing server. About caching error response, it says it will be 0s by default, then if I create page rule to cache everything for a week, is this also changing the error response TTL to 1 week?


Cloudflare will use either our defaults or if you set a different value in your response we’ll use that for the error codes listed previously.