
Cloudflare is a global content delivery network (CDN), security, and performance platform that protects and speeds up websites. It acts as a reverse proxy, routing traffic through its network for DDoS protection, WAF (Web Application Firewall), caching, and more.
This guide shows you how to set up Cloudflare with a full nameserver setup (the most common method), which works with InMotion Hosting shared, VPS, or dedicated plans. Always refer to Cloudflare’s official documentation for the latest interface details, as dashboards evolve.
Prerequisites
- An active Cloudflare account (free plan is sufficient for most users).
- Access to your domain’s nameserver settings (either in InMotion Hosting’s Account Management Panel (AMP) if registered there, or at your domain registrar).
- Back up your current DNS records from cPanel’s Zone Editor.
- InMotion Hosting’s AutoSSL (or another valid SSL certificate) installed on your hosting account.
Note: DNS changes, especially nameserver updates, can take up to 24 hours to propagate fully.
Step-by-Step: Setting Up Cloudflare
- Log in to the Cloudflare Dashboard. Go to dash.cloudflare.com and sign in.
- Onboard Your Domain
- Go to Domains and select Onboard a domain.
- Enter your apex domain (e.g., example.com) and continue.
- Cloudflare will scan for existing DNS records. Review them carefully.
- Note Your Cloudflare Nameservers Cloudflare assigns two nameservers to your domain, and each name ends in
ns.cloudflare.com. Write them down exactly. These replace your current nameservers. - Update Nameservers at Your Registrar
- If your domain is registered with InMotion Hosting, log in to the Account Management Panel (AMP) and update the nameservers there.
- If it is registered elsewhere, log in to that registrar’s control panel and replace the existing nameservers with Cloudflare’s.
- Save changes. Do not add Cloudflare nameservers as records inside your old DNS. Replace them at the registrar level.
- Confirm in Cloudflare Once updated, return to Cloudflare. When the change takes effect, your domain shows a status of Active on the Domains page, and Cloudflare sends you an email.
Your basic setup is now complete. Cloudflare is proxying traffic (orange cloud icon on DNS records).
SSL/TLS Configuration (Critical for Security)
For end-to-end encryption:
- Go to SSL/TLS > Overview.
- Set the encryption mode to Full (strict). This is the recommended and most secure option. It requires a valid SSL certificate on your InMotion Hosting server (AutoSSL provides one).
Avoid Flexible mode (only encrypts visitor-to-Cloudflare traffic) as it is less secure and can cause redirect issues.
Tip: If you encounter mixed-content or redirect loops, make sure your WordPress/site settings force HTTPS and clear caches.
DNS Settings After Switching
When you onboarded your domain, Cloudflare imported your cPanel DNS zone and proxied its A and CNAME records by default. That suits your website but not your email. Mail clients (IMAP, POP, and SMTP) cannot connect through Cloudflare’s proxy, so the mail hostname must point straight at your server with the proxy off.
The cPanel default zone sets mail as a CNAME to your domain. Because proxying is on by default when you onboard a domain, that record arrives in Cloudflare as proxied. The table shows the change you are about to make. Replace example.com with your domain.
| Type | Name | Value | Proxy status |
|---|---|---|---|
| CNAME (before) | example.com | Proxied (onboarding default) | |
| A (after) | Your cPanel server IP | DNS only | |
| MX (before and after) | @ (example.com) | mail.example.com, priority 0 | DNS only (always) |
- In the Cloudflare dashboard, select your domain and go to DNS > Records.
- Find the
mailrecord and follow the path for its type:- CNAME (the cPanel default): Click Edit, then Delete. The dashboard does not let you change a record’s type, so you delete the CNAME and create an A record in its place. Continue at step 3.
- A record: Click Edit, set Proxy status to DNS only (gray cloud), and click Save. Skip steps 3 and 4 and continue at step 5.
- Click Add record and enter these values:
- Type: A
- Name:
mail - IPv4 address: your cPanel server IP. In cPanel, the General Information panel shows it as Shared IP Address or Dedicated IP Address. On Shared Hosting, see How to Find Your Server’s Shared IP Address in cPanel for a walkthrough.
- Proxy status: DNS only (gray cloud)
- TTL: Auto
- Click Save.
- Check the MX record. Its Name is your root domain (shown as
@or the domain), its Mail server ismail.example.com, and its Priority is0. MX records are always DNS only. If the import missed it, click Add record and create it. See how MX records work in cPanel for background. - Leave your SPF, DKIM, and DMARC TXT records as imported. TXT records are always DNS only, so there is nothing to toggle.
If you connect to FTP by the ftp hostname, check that record too. Depending on your server’s zone template, it is a CNAME to your domain or an A record, and either one is proxied after onboarding. Make ftp a DNS-only A record that points to your server IP with the same steps, or connect with your server IP or server hostname instead.
Note: Setting the mail CNAME to DNS only is not enough. A DNS-only CNAME that points at a proxied hostname is treated as proxied, so mail would still resolve to Cloudflare while your root domain record is proxied. An A record that points straight at the server IP avoids that.
Keep web traffic proxied (orange cloud) and the mail hostname and MX records unproxied. Subdomains such as cpanel and webmail can stay proxied because they use web ports that Cloudflare carries. For the mail ports your email client needs, see email client settings for SSL.
Recommended Cloudflare Settings
- Security: Enable Bot Fight Mode (free) or the WAF. Use I’m Under Attack mode only during active attacks.
- Performance: Review your caching settings. On Pro and higher plans, you can also enable Polish (image optimization). Cloudflare compresses content by default, including Brotli on Pro and Business plans.
- DNS: Enable DNSSEC in Cloudflare after setup (disable it first at your old registrar if enabled).
- Advanced: Consider Tiered Cache (available on all plans) for high-traffic sites.
How to Disable or Pause Cloudflare
Temporary Pause (recommended for testing):
- Go to your domain > Overview.
- Scroll to Advanced Actions > Pause Cloudflare on Site.
Permanent Removal:
- Change your nameservers back to InMotion Hosting’s (or your previous provider) at the registrar.
- Remove the domain from Cloudflare if desired.
Troubleshooting Tips
- Propagation delays: Use whatsmydns.net to check nameserver changes.
- Email clients cannot connect after the switch: IMAP, POP, or SMTP connections time out, although webmail by domain may still load. A proxied
mailrecord causes this, because Cloudflare’s proxy does not carry mail protocols. In DNS > Records, makemailan A record that points to your server IP with Proxy status set to DNS only, and point your MX record atmail.example.com. Then wait for the old record’s TTL to expire before you test again. - FTP by hostname will not connect: A proxied
ftprecord, or anftpCNAME to your proxied domain, has the same problem asmail. Makeftpan A record that points to your server IP with the proxy set to DNS only, or connect with your server IP or server hostname. - Too many redirects: Switch to Full (strict) SSL and force HTTPS on your site.
- Slow performance: Clear Cloudflare cache and review your Cache Rules.
For help with InMotion Hosting items (for example, finding your server IP or AutoSSL), contact InMotion Hosting support. For Cloudflare features, use their support or community.
Leave the Technical Heavy Lifting to Us
Whether you need server tweaks, security updates, or scalability support, our sysadmin team has you covered. Get support that matches your business needs and keeps your site running strong.