{"id":5029,"date":"2025-03-05T12:59:04","date_gmt":"2025-03-05T17:59:04","guid":{"rendered":"https:\/\/underhost.com\/blog\/?p=5029"},"modified":"2025-03-07T13:17:21","modified_gmt":"2025-03-07T18:17:21","slug":"the-best-way-to-use-cloudflare-with-cpanel-whm-for-better-performance","status":"publish","type":"post","link":"https:\/\/underhost.com\/blog\/the-best-way-to-use-cloudflare-with-cpanel-whm-for-better-performance\/","title":{"rendered":"The Best Way to Use Cloudflare with cPanel &#038; WHM for Better Performance"},"content":{"rendered":"<h2><strong>Why Use Cloudflare with cPanel &#038; WHM?<\/strong><\/h2>\n<p>Cloudflare is a powerful CDN (Content Delivery Network) that improves website speed, security, and uptime. When properly configured with <a href=\"https:\/\/underhost.com\/cpanel.php\" target=\"_blank\">cPanel &#038; WHM<\/a>, Cloudflare can:<\/p>\n<ul>\n<li>Reduce server load by caching static content.<\/li>\n<li>Protect against DDoS attacks and malicious traffic.<\/li>\n<li>Improve global page load speeds with distributed caching.<\/li>\n<li>Enhance security with Web Application Firewall (WAF).<\/li>\n<\/ul>\n<h2><strong>Step 1: Create and Configure a Cloudflare Account<\/strong><\/h2>\n<ol>\n<li>Go to <a href=\"https:\/\/www.cloudflare.com\/\" target=\"_blank\">Cloudflare\u2019s website<\/a> and sign up.<\/li>\n<li>Add your domain and allow Cloudflare to scan your DNS records.<\/li>\n<li>Select a plan (Free, Pro, or Business depending on your needs).<\/li>\n<li>Cloudflare will provide new nameservers. Update them in your domain registrar.<\/li>\n<\/ol>\n<h2><strong>Step 2: Optimize Cloudflare Settings for cPanel Hosting<\/strong><\/h2>\n<h3><strong>Enable Full Page Caching<\/strong><\/h3>\n<ul>\n<li>Go to Cloudflare\u2019s dashboard and enable <strong>Caching \u2192 Full Page Cache<\/strong>.<\/li>\n<li>Set TTL (Time to Live) to reduce frequent requests to the origin server.<\/li>\n<\/ul>\n<h3><strong>Enable Brotli Compression &#038; Auto Minify<\/strong><\/h3>\n<ul>\n<li>Go to <strong>Speed \u2192 Optimization<\/strong>.<\/li>\n<li>Enable <strong>Brotli compression<\/strong> for faster delivery of HTML, CSS, and JS files.<\/li>\n<li>Enable Auto Minify for JavaScript, CSS, and HTML.<\/li>\n<\/ul>\n<h3><strong>Activate Cloudflare Web Application Firewall (WAF)<\/strong><\/h3>\n<ul>\n<li>Enable WAF to protect against SQL injections and bot attacks.<\/li>\n<li>Use Cloudflare\u2019s OWASP rule set for enhanced security.<\/li>\n<\/ul>\n<h3><strong>Set Up DNS Proxy for Faster Resolution<\/strong><\/h3>\n<ul>\n<li>Ensure DNS records are set to <strong>Proxied (Orange Cloud)<\/strong> in Cloudflare.<\/li>\n<li>Disable DNS proxy for mail and FTP records to avoid connection issues.<\/li>\n<\/ul>\n<h2><strong>Step 3: Configure Cloudflare with WHM for Server-Wide Optimization<\/strong><\/h2>\n<ol>\n<li>Go to WHM and navigate to <strong>Networking Setup \u2192 Host Access Control<\/strong>.<\/li>\n<li>Allow Cloudflare\u2019s IP ranges to ensure proper traffic filtering.<\/li>\n<li>Install <strong>mod_remoteip<\/strong> to preserve visitor IPs in Apache logs.<\/li>\n<\/ol>\n<h2><strong>Step 4: Test and Monitor Performance<\/strong><\/h2>\n<ul>\n<li>Use <a href=\"https:\/\/gtmetrix.com\/\" target=\"_blank\">GTmetrix<\/a> and <a href=\"https:\/\/pagespeed.web.dev\/\" target=\"_blank\">Google PageSpeed Insights<\/a> to analyze improvements.<\/li>\n<li>Monitor real-time traffic in Cloudflare\u2019s dashboard.<\/li>\n<li>Check <a href=\"https:\/\/monitor.underhost.com\/\" target=\"_blank\">UnderHost\u2019s Monitoring<\/a> for server performance insights.<\/li>\n<\/ul>\n<h2><strong>Need Expert Help with Cloudflare Setup?<\/strong><\/h2>\n<p>For a fully optimized Cloudflare and cPanel setup, check out <a href=\"https:\/\/underhost.com\/managed-business-hosting.php\" target=\"_blank\">UnderHost\u2019s Managed Hosting<\/a>. Need support? Contact <a href=\"https:\/\/customerpanel.ca\/client\" target=\"_blank\">@CustomerPanel<\/a> for assistance.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Enhance website speed, security, and reliability by integrating Cloudflare with cPanel &#038; WHM.<\/p>\n","protected":false},"author":1,"featured_media":4638,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,77],"tags":[],"class_list":["post-5029","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","category-cloudflare"],"_links":{"self":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/5029","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/comments?post=5029"}],"version-history":[{"count":3,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/5029\/revisions"}],"predecessor-version":[{"id":5101,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/5029\/revisions\/5101"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media\/4638"}],"wp:attachment":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media?parent=5029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/categories?post=5029"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/tags?post=5029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}