Skip to main content

GuideHow to use Cloudflare with WordPress at MariHost

Guides

Last updated: 26 October 2026

Cloudflare puts its worldwide network in front of your website. It keeps copies of your images, CSS and JavaScript close to your visitors, and filters out attacks before they reach our servers. Its free plan is enough for many sites. This guide moves your domain's DNS from MariHost to Cloudflare without breaking your email, and sets up HTTPS the right way. It takes about 30 minutes, plus a few hours for the change to go through.

Do you need it? Not always. Our servers already have MariHost Shield, and MariCDN, free for 3 GB a month, speeds up your files for visitors abroad. Cloudflare is worth it if your visitors are spread around the world, or you want its firewall in front of a busy site or a shop.

Before you start

  • Your website works at MariHost, with the padlock. Your domain points to us, and your site opens over HTTPS. Cloudflare will check the certificate on our server, so it needs to be there first: see Turn on SSL and force HTTPS.
  • A free Cloudflare account, from cloudflare.com.
  • The login for your registrar, the company you pay for your domain, to change its nameservers. Registered your domain with us? Change them yourself in your client area at billing.marihost.com.

Is your domain already on Cloudflare? Keep it there, and point it to MariHost with two A records instead: see "Using Cloudflare?" in Point your domain to MariHost.

Once you switch, your domain's DNS records are managed in Cloudflare, not in our control panel.

Add your domain to Cloudflare

  1. Log in to Cloudflare, go to Domains and click Onboard a domain.
  2. Type your domain without www, such as example.com, and let Cloudflare scan for your existing DNS records. Click Continue.
  3. Choose the Free plan. You can upgrade later.

Cloudflare then shows the DNS records it found. Don't change your nameservers yet.

Check your DNS records

Cloudflare's scan finds most records, but it can miss some, especially the ones for email. Open your domain's DNS records in our control panel next to it: Websites → your website → Domains → your domain → DNS records. Our guide to managing DNS records shows where. If the list has more than one page, set Show to a higher number, so you see them all.

Make sure every record in the control panel is also in Cloudflare, with the same type, name and value. Add any that are missing with Add record in Cloudflare. Then set each record's proxy status:

  • Your website: Proxied (orange cloud). The A record for @, and the record for www (A or CNAME).
  • Your email: DNS only (grey cloud). The A record for mail, the CNAME records for imap, pop and smtp, and the MX record.
  • File transfers and databases: DNS only (grey cloud). The CNAME record for ftp and the A record for mysql.
  • TXT records for SPF (v=spf1…), DKIM (hostingcp._domainkey) and DMARC (_dmarc), which keep your email out of spam. They have no proxy setting: just make sure they're there.

Cloudflare's proxy only carries website traffic. A proxied email or FTP record stops that service working, so anything that isn't your website stays DNS only. If Cloudflare found any AAAA records, delete them: our servers don't use IPv6.

The DKIM record is the one most often missed. Copy its value from the control panel in full: see SPF, DKIM and DMARC.

Change your nameservers

When the records match, Cloudflare gives you two nameservers, with names ending in .ns.cloudflare.com.

  1. Turn off DNSSEC first, if it's on. If you turned on DNSSEC for your domain, remove its DS record at your registrar and wait for it to clear, up to a day. Changing nameservers with DNSSEC on can take your domain offline. You can turn DNSSEC on again in Cloudflare later.
  2. Log in to your registrar and find your domain's nameservers.
  3. Replace ns1.maridns.com and ns2.maridns.com with Cloudflare's two, and save. Don't keep our nameservers alongside theirs.

Cloudflare checks your nameservers and emails you when your domain is active, usually within a few hours. Some registrars take up to a day to send the change through. Your website and email keep working during the switch, because Cloudflare has the same records as us.

Set SSL to Full (strict)

In Cloudflare, open your domain, go to SSL/TLS → Overview and choose Full (strict). If Cloudflare shows Automatic SSL/TLS, choose the custom option to pick the mode yourself.

Full (strict) encrypts the connection all the way to our server and checks our certificate. Never choose Flexible: it connects to our server without HTTPS, our server sends it back to HTTPS, and your visitors get "too many redirects".

Cloudflare with WordPress: after the switch

  • Make DNS changes in Cloudflare. The DNS records in our control panel are no longer used. When you add a domain or an email address on a new domain, or turn on DKIM, the control panel creates new records: copy them to Cloudflare yourself.
  • Clear Cloudflare's cache from WordPress. Cloudflare keeps copies of your images, CSS and JavaScript. Connect it to LiteSpeed Cache, and Purge All clears both: see the Cloudflare section in LiteSpeed Cache settings.
  • Large uploads. Cloudflare's proxy refuses uploads over 100 MB on the Free and Pro plans. For bigger files, see Increase the upload size.
  • Your control panel, webmail and client area don't change: they have their own addresses.

If something's not right

"Too many redirects." Cloudflare's SSL mode is Flexible. Set it to Full (strict), then try again in a private window.

Error 526 (invalid SSL certificate). Cloudflare couldn't check the certificate on our server. Open a ticket with your domain, and we'll check your certificate and renew it.

Error 521 or 522. Cloudflare can't reach our server. Check our status page, then open a ticket with your domain.

Email stopped working. A mail record is missing in Cloudflare, or set to Proxied. Compare the records with the control panel again, and set the mail records to DNS only.

A DNS change in the control panel did nothing. That's expected once your domain uses Cloudflare: make the change in Cloudflare.

You want to undo it. Copy any records you added in Cloudflare to the control panel, then change the nameservers back to ns1.maridns.com and ns2.maridns.com.

Next steps

Connect LiteSpeed Cache to Cloudflare, so clearing the cache clears both. Need a record for another service? See Manage DNS records.

Want Cloudflare set up for you?

We set up Cloudflare Pro for WordPress and bill it with your hosting, at 10% off Cloudflare's price.