← Centre d'aide/Réseau et latence

Speed Up and Protect Your VPS Website with Cloudflare

Cloudflare's free plan gives a VPS-hosted website three things: a global CDN, free SSL and baseline DDoS protection. This article walks through onboarding and the settings that matter.

Onboarding steps

  • Step 1: sign up at Cloudflare and add your domain — it scans your existing DNS records automatically;
  • Step 2: at your domain registrar, change the domain's nameservers (NS) to the two addresses Cloudflare assigns;
  • Step 3: wait for NS propagation (minutes up to 24 hours). When the Cloudflare dashboard shows Active, you are on.

Orange cloud vs grey cloud

The cloud icon next to each DNS record is the key switch: orange means traffic flows through Cloudflare (real IP hidden, CDN and protection on); grey means DNS-only, traffic goes straight to your server. Use orange for website records; SSH and other non-web services must stay grey or connect by IP directly.

Three settings to check

  • SSL/TLS mode: set to Full (strict), with a certificate installed on the origin (a free one is fine). The Flexible mode commonly causes infinite redirect loops;
  • Caching: static assets are cached by default and rarely need tuning. If pages look stale after a redesign, hit Purge under "Caching";
  • Security level: under attack, temporarily enable Under Attack mode in "Security" — visitors see a 5-second challenge first.

Impact on visitors in mainland China

Cloudflare's free plan has no nodes in mainland China, so mainland visitors detour through overseas POPs and latency may rise. If your main audience is in the mainland, keep the core domain grey-cloud (relying on the Japan node's inherently low latency) and orange-cloud only the domains serving overseas users.

Cet article a été rédigé avec l'aide de l'IA par l'équipe éditoriale de SharkCloud et relu avant publication.