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
-
Create a Cloudflare account
Sign up at cloudflare.com and add your domain by clicking Add a Site.
-
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.
-
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.
-
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
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 Mode | Result |
|---|---|
| Off | No encryption-never use this |
| Flexible | Causes redirect loops if server has HTTPS redirect-avoid |
| Full | End-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:
- In Cloudflare → SSL/TLS, change the mode from Flexible to Full
- Clear your browser cache and Cloudflare's cache (Caching → Purge Everything)
- Wait 2–5 minutes and reload
Having Cloudflare issues?
Contact our support team if you encounter DNS, SSL, or redirect loop problems with Cloudflare.





















