KnowledgebaseHow to Use Cloudflare With Middlehost (DNS, SSL, and Common Fixes)

Step-by-step guide to connect Cloudflare with Middlehost hosting: change nameservers, set DNS records, configure SSL/TLS, and fix common issues like 521, 525, redirect loops, and Universal SSL pending.

Documentationβ€’Updated May 16, 2026

How to Use Cloudflare With Middlehost (DNS, SSL, and Common Fixes)

If your site is on Middlehost and you want to use Cloudflare, the process is straightforward: add your domain to Cloudflare, copy your current DNS records, then point your domain nameservers to Cloudflare and verify the zone. After that, set the right SSL mode to avoid errors and redirect loops. This setup works for most WordPress and static sites on our stack.

This guide covers a safe baseline for WordPress, custom sites, and typical cPanel hosting on Middlehost, plus quick fixes for the most common Cloudflare errors.

Before you start (important)

  • Know where your domain is registered: It might be Middlehost, another registrar, or a reseller. Nameservers are always changed at the registrar.
  • Collect your hosting details: You need your website IP address (or the hostname your plan uses). In cPanel, check Zone Editor or your account welcome details. If you are unsure, open a ticket and we can confirm the correct A record targets.
  • Decide what Cloudflare will manage:
    • DNS only: Cloudflare manages DNS, but does not proxy traffic (gray cloud). Good if you just want DNS and email stability.
    • DNS + proxy: Cloudflare proxies HTTP/HTTPS (orange cloud) for caching, WAF, and DDoS protection. Recommended for public websites, but SSL must be configured correctly.

Step 1: Add your domain to Cloudflare

  1. Create a Cloudflare account (or log in).
  2. Click Add a site and enter your domain (example: example.com).
  3. Select a plan (Free is fine for most sites).
  4. Cloudflare will scan existing DNS records. Do not rush this step, you must confirm the records are correct.

Step 2: Copy DNS records (avoid downtime)

Downtime usually happens because DNS records were missing after switching nameservers. Before you switch, make sure Cloudflare has all critical records.

DNS records you usually need

  • Website: An A record for @ (root domain) pointing to your Middlehost server IP, and a CNAME for www pointing to @ (or to the hostname we provide for your account).
  • Email: MX records plus SPF (TXT), DKIM (TXT), and DMARC (TXT). If you use Gmail or Microsoft 365, ensure those records match your provider.
  • Other services: Any subdomains you use, like cpanel, webmail, ftp, autodiscover, or an app like api.

Example DNS setup (typical website)

Use this as a pattern. Replace values with what you see in cPanel Zone Editor or your onboarding email.

TypeNameValueProxy
A@Your Middlehost server IPProxied (orange) for websites
CNAMEwww@Proxied (orange) for websites
TXT@SPF record (if email is used)DNS only
MX@Mail server targetsDNS only
Tip: never proxy mail-related hostnames (like mail, smtp, imap). Keep them DNS only (gray cloud).

Step 3: Change nameservers to Cloudflare

After you confirm the DNS records inside Cloudflare, you can switch nameservers at your domain registrar.

  1. In Cloudflare, copy the two nameservers it provides (example format: alex.ns.cloudflare.com, lisa.ns.cloudflare.com).
  2. Go to your registrar and open your domain management page.
  3. Replace the current nameservers with the Cloudflare nameservers.
  4. Save changes.

If your domain is registered at Middlehost, follow this guide: How to Change Nameservers.

Step 4: Verify DNS is correct after propagation

  • Nameserver propagation: usually minutes to a few hours, sometimes up to 24 hours.
  • What to check: your domain resolves to the right IP, and www loads the same site as the root domain.
  • Email check: confirm MX records are present and unchanged.

Step 5: Configure SSL/TLS the safe way (avoid 525, 526, redirect loops)

Most Cloudflare plus origin issues are SSL mode mismatches. Here is the safest baseline:

  • Recommended: Full (strict) if your origin (Middlehost) has a valid SSL certificate installed, for example AutoSSL in cPanel.
  • Temporary fallback: Full if your origin certificate is still provisioning.
  • Avoid: Flexible for WordPress and most modern sites. It often causes redirect loops and login or cookie issues because the origin stays HTTP.

If you recently changed nameservers and now see SSL errors, also review: Fixing SSL Error After Changing Nameservers to Cloudflare.

Step 6: Decide what should be proxied (orange cloud) vs DNS only

Use Cloudflare proxy for your website hostnames, and keep infrastructure and email records DNS only.

  • Proxy (orange cloud): @, www, and public web apps like app or blog.
  • DNS only (gray cloud): mail records (MX, SPF, DKIM, DMARC), mail, smtp, imap, and any service that does not run on HTTP/HTTPS.

WordPress notes (Middlehost + Cloudflare)

  • Cache: If your site uses LiteSpeed plus LSCache, do not enable multiple overlapping caches without a plan. Cloudflare cache and LSCache can work together, but configure cache rules carefully for dynamic pages like checkout and account pages.
  • Login and admin: Exclude /wp-admin and /wp-login.php from aggressive caching rules.
  • Performance limits: If your WordPress site hits CPU, RAM, or inode limits, Cloudflare can reduce load, but it will not fix an underpowered plan. For consistent performance, choose a plan with enough resources and a modern stack (LiteSpeed, NVMe, and enough CPU/RAM). See web hosting plans or cloud hosting.

Troubleshooting: common Cloudflare errors with Middlehost

ProblemWhat it usually meansFix
Error 521Cloudflare cannot connect to your origin web server.Confirm the origin is online, verify DNS points to the correct server IP, and check if the origin firewall is blocking Cloudflare IPs. You can temporarily set the A or CNAME record to DNS only to test direct origin access.
Error 525SSL handshake failed between Cloudflare and origin.Set SSL/TLS to Full or Full (strict) and ensure a valid SSL certificate is installed on the origin. Avoid Flexible for WordPress.
Error 526Origin certificate is invalid in Full (strict) mode.Install a valid certificate on the origin (or use a Cloudflare Origin Certificate). Temporarily switch to Full while you fix the origin SSL.
Too many redirectsHTTPS redirect rules conflict (Cloudflare settings vs WordPress vs server rules).Avoid Flexible, set Full (strict), and ensure only one place enforces HTTPS (prefer origin plus Full (strict)). Also verify WordPress site URL is https.
Universal SSL pendingCloudflare has not issued an edge certificate yet.Wait for issuance (can take time), confirm DNS is active on Cloudflare, and do not keep changing settings repeatedly. Use Full mode if origin SSL exists.
Site not loading after nameserver changeMissing or wrong DNS records in Cloudflare.Re-check A record for @ and CNAME for www, plus any required subdomains. Confirm you copied email records if email is used.

FAQs

Should I use registrar DNS or Cloudflare DNS?

If you want Cloudflare features like caching, WAF, and DDoS protection, use Cloudflare nameservers and manage DNS there. If you only need basic DNS and want fewer moving parts, keeping DNS at your registrar or using our nameservers can be simpler. Either option can work, but do not split authority between two DNS providers.

Will Cloudflare make my Middlehost website faster?

Often yes, especially for global visitors and image-heavy sites. Cloudflare can cache static assets, reduce latency, and block abusive traffic. However, it will not fix slow PHP, heavy plugins, or low server resources like limited CPU and RAM. For WordPress, use smart caching and keep dynamic pages excluded.

Do I need to change anything in cPanel after switching to Cloudflare?

Usually no. Most changes happen in Cloudflare DNS and SSL settings. In some cases, you may need to confirm your domain is assigned to the right account in cPanel, ensure the origin SSL is installed, and verify any redirects. If you proxy traffic through Cloudflare, make sure the origin is not blocking Cloudflare IPs.

Can I use Cloudflare with email on my domain?

Yes. Keep email-related records as DNS only: MX, SPF, DKIM, and DMARC. Do not proxy mail hostnames like smtp or imap. If email stops working after switching to Cloudflare, it is usually because MX records were missing or incorrect, so re-check the DNS zone in Cloudflare.

What is the safest Cloudflare SSL mode for WordPress on Middlehost?

Full (strict) is the safest when your origin has a valid SSL certificate, because it keeps end-to-end HTTPS and prevents downgrade issues. Full can work temporarily if the origin certificate is still provisioning. Avoid Flexible for WordPress because it commonly triggers redirect loops and mixed-content behavior.

Supercharge Your Website with Blazing-Fast Hosting

Join thousands of businesses and creators who trust us to deliver unmatched speed, reliability, and support. Let’s chat and find the perfect plan for you!

Chat with Us
99.9% Uptime
24/7 Support