Well, I would suggest to run your WordPress website in a debug mode just in case.
I believe you can find them under the Settings → Permalink:
NOTE: Either in case you do not change anything, just hit the button “Save”.
P.S. Maybe you would need to install the plugin like Better Search and Replace, to find out the links to your sub.domain.com
and therefore replace sub.domain.com
with domain.com
in your database using it.
And possible redirection issue or something more could be in case you are using a non-www and put www there, or vice-versa. Please, re-check this under the Settings too for “Home URL” and “Blog URL” field.
I am afraid this is not related to Cloudflare, or, somehow it could be if the server returned some timeout or was busy and Cloudflare request has timed out after 100s, so the WordPress dashboard thrown that error - just guessing the scenarios.
Rather, would be a 524 error, if so: