UnderHost
Knowledgebase Docs

How to set up Cloudflare with UnderHost hosting

Configure Cloudflare CDN and DDoS protection with your UnderHost hosting account. Covers nameserver setup, SSL modes, proxy settings,

On this page

Cloudflare is a CDN and security service that sits between your visitors and your hosting server. It caches static content globally for faster delivery, provides DDoS protection, and offers free SSL. UnderHost hosting is fully compatible with Cloudflare.

Setting up Cloudflare

  1. Create a Cloudflare account

    Sign up at cloudflare.com and add your domain by clicking Add a Site.

  2. Import your DNS records

    Cloudflare automatically scans and imports your existing DNS records. Review them carefully-make sure your A, MX, and other records are present before proceeding.

  3. Update your nameservers

    Cloudflare provides two nameservers. Update your domain's nameservers at your registrar to point to these Cloudflare nameservers (not UnderHost's nameservers). DNS management for your domain then happens in Cloudflare.

  4. Set SSL mode to Full (Strict)

    Go to SSL/TLS in your Cloudflare dashboard and set the encryption mode to Full (Strict). See below-this is critical.

Critical: SSL mode setting

Always use Full or Full (Strict)-never Flexible

Cloudflare Flexible mode encrypts only the connection between the visitor and Cloudflare. Cloudflare then connects to your server over plain HTTP. If your server has an HTTPS redirect (which it should), this creates an infinite redirect loop. Use Full (Strict) when you have a valid SSL certificate on your server (AutoSSL provides this).

SSL ModeResult
OffNo encryption-never use this
FlexibleCauses redirect loops if server has HTTPS redirect-avoid
FullEnd-to-end encryption; accepts any certificate including self-signed
Full (Strict)End-to-end encryption; requires a valid certificate-best option with AutoSSL

The orange cloud-proxy mode

In Cloudflare DNS settings, each record has a cloud icon:

  • Orange cloud (proxied)-Traffic goes through Cloudflare's network. You get CDN, DDoS protection, and your server IP is hidden.
  • Grey cloud (DNS only)-Cloudflare just manages DNS. No CDN or protection. Server IP is visible in WHOIS lookups.

Enable the orange cloud on your main A records (root domain and www). This hides your UnderHost server IP and provides Cloudflare's protection.

Subdomains to NOT proxy through Cloudflare

Some records should remain grey (DNS only) because Cloudflare proxying interferes with certain protocols:

  • mail.yourdomain.com-Email doesn't work through Cloudflare's proxy; keep grey cloud
  • ftp.yourdomain.com-FTP doesn't work through Cloudflare's proxy
  • Wildcard (*) subdomains-Cloudflare's free plan doesn't support wildcard proxying
  • SFTP/SSH subdomains-Keep these as DNS only

Fixing the redirect loop

If your site shows "Too many redirects" after adding Cloudflare:

  1. In Cloudflare → SSL/TLS, change the mode from Flexible to Full
  2. Clear your browser cache and Cloudflare's cache (Caching → Purge Everything)
  3. Wait 2–5 minutes and reload
Was this article helpful?

Having Cloudflare issues?

Contact our support team if you encounter DNS, SSL, or redirect loop problems with Cloudflare.

Related articles

Back to Cloudflare