Tutorials

Cloudflare DNS Setup for Offshore Hosting: Step-by-Step Tutorial

Step-by-Step Tutorial

What you will set up

By the end, your domain will run through Cloudflare — with your traffic going through Cloudflare first, and then on to your offshore hosting server. You also get a free SSL padlock and faster page loads.

Do one step at a time. Finish a step, check it works, then move on. The big change here is swapping your nameservers, so go slowly and keep your email records safe.

Where you workCloudflare + your domain registrar.
How longAbout 15 minutes, plus DNS wait time.
Why do itFaster, safer DNS in front of your offshore server.

Before you start

The goal: point your domain at Cloudflare, keep it connected to your offshore hosting IP, and turn on SSL — without breaking your website or your email.

Write down your current DNS first. Before changing anything, open your existing DNS panel and note every record: your A record (your hosting IP), and especially your MX and TXT records (these run your email). If anything goes wrong, you can put them back exactly as they were.

  • Keep your domain registrar login ready (where you bought the domain).
  • Keep your offshore hosting IP address handy.
  • Note your current MX and TXT (email) records before you start.
  • Open a notes file and write down every change you make.

Where does each change happen?

This tutorial only touches two places. Here is the simple rule:

  • DNS records (A, MX, TXT) → the Cloudflare dashboard.
  • Nameservers → your domain registrar (the company you bought the domain from).
Map of where each Cloudflare DNS step happens for offshore hosting
Where each step happens: Cloudflare for records, your registrar for nameservers.

The steps

Step 1: Add your site to Cloudflare

Create a free account at cloudflare.com. On the dashboard, click Add a site and type your domain (for example, yourdomain.com), then continue and pick the Free plan.

Check: your domain now appears in your Cloudflare dashboard.

Step 2: Review the scanned DNS records

Cloudflare automatically scans your current DNS and lists the records it found. Look down the list carefully. Make sure your MX and TXT records (these run your email) are present. If any email record is missing, add it back exactly as it was in your old panel.

Check: your A record, MX records, and TXT records all show in the Cloudflare DNS list.

Step 3: Change the nameservers at your registrar

Cloudflare shows you two nameservers (something like ana.ns.cloudflare.com and bob.ns.cloudflare.com). Log in to your domain registrar, find the nameserver setting, remove the old ones, and paste in the two Cloudflare ones. This is the step that actually switches your domain over to Cloudflare.

Check: after saving, Cloudflare’s status changes to “Active” (this can take a little while to update).

Step 4: Set the A record and SSL mode

In Cloudflare’s DNS tab, make sure your A record points your domain to your offshore hosting IP, and that the cloud icon next to it is orange (proxied/ON). Then open SSL/TLS and set the encryption mode to Full (strict).

Check: the A record shows your offshore IP with an orange cloud, and SSL/TLS mode reads “Full (strict)”.

Extra commands you may need

Run these only on your own server. If your server uses a managed panel, check with support before changing system-level settings.

Confirm the nameservers changed

dig +short NS yourdomain.com

This should show the cloudflare.com nameservers. If it still shows your old host, the change has not finished spreading yet — wait and try again.

Check that DNS resolves

dig +short yourdomain.com

This shows the IP your domain currently resolves to. With the proxy on, you will see a Cloudflare IP — that is normal and expected.

Keep short notes as you go

While you work, jot down each change: the old value, the new value, the time, and whether the test passed. For example: “Old nameservers ns1.oldhost.com, new ones ana/bob.ns.cloudflare.com, changed 10:30, site loads, SSL works, email works.” It sounds small, but it saves a lot of confusion if something breaks.

Pay special attention to your MX and TXT records. Copy them into your notes before you start, so you can restore email instantly if it stops.

If a step fails, how to undo it

Always have a way back. To undo the whole switch, put your registrar’s original nameservers back — the domain returns to your old DNS. For a single record, edit it back to the value in your notes. If email stops, restore the exact MX record you saved. Don’t change ten things at once.

Final testing checklist after setting up Cloudflare DNS for offshore hosting
The final testing checklist.

How to test after setup

  1. Open your homepage in a private browser window.
  2. Open an inner page, a blog post, and a service page.
  3. Check the HTTPS padlock — there should be no browser warning.
  4. Run dig +short NS yourdomain.com and confirm the Cloudflare nameservers.
  5. Send yourself a test email to confirm your MX records still work.
  6. Check that key pages return 200 and there are no redirect loops.

Quick troubleshooting

Problem Likely reason What to do
Site not loading after the nameserver change DNS is still spreading, or the A record is wrong Wait for propagation, then check the A record points to your offshore IP
SSL error or warning SSL mode mismatch or missing origin certificate Set SSL/TLS to Full (strict) and make sure your server has a valid origin certificate
Email stopped working The MX record was changed or dropped during the move Restore your original MX record exactly as it was before

Final checklist

  • Site added in Cloudflare.
  • MX and TXT records kept.
  • Nameservers changed at the registrar.
  • A record points to your offshore IP with the orange cloud on.
  • SSL/TLS set to Full (strict).
Need hosting behind your Cloudflare setup?

OffshoreKaka offers privacy-friendly offshore web hosting that pairs perfectly with Cloudflare DNS.

View OffshoreKaka hosting plans

FAQ

Will Cloudflare hide my offshore hosting IP?

When the proxy is on (orange cloud), visitors see a Cloudflare IP instead of your real server IP. Your offshore hosting still serves the site behind it — Cloudflare just sits in front.

Will this boost my Google ranking on its own?

No. Cloudflare can make your site faster and add HTTPS, which helps. But your content and backlinks still decide where you actually rank.

What should I send to support if something breaks?

Send your domain name, your offshore hosting IP, the exact error message, a screenshot, the last change you made, and whether it started after the nameserver or SSL change.

Leave a Reply

Your email address will not be published. Required fields are marked *