The entire website configured with DNS through Cloud Flare is not connected smoothly


Sorry to hear you are having some difficulties. What is the zone in question?
Also, typically 504 errors are caused by some common items detailed in this guide. It can come from Cloudflare, or it could be from your origin. The image on the 504 page will reflect whether it is coming from Cloudflare or your origin.