How to Reduce Latency for Global Visitors Using CDN with Your VPS

When you run a website or application on a VPS, ensuring fast performance for visitors worldwide can be a challenge. Latency — the time it takes for data to travel from your server to your users — can vary greatly depending on their geographic location.

At HostEONS, we offer fast and reliable VPS hosting across multiple global locations. But you can supercharge your performance even more by integrating a Content Delivery Network (CDN) with your VPS. Here’s how and why it works.


🚀 What Is Latency?

Latency is the delay before a transfer of data begins following an instruction. High latency results in slow page loads and poor user experience, especially for users far from your VPS’s data center.


🌐 How a CDN Helps Reduce Latency

CDN (Content Delivery Network) is a globally distributed network of proxy servers and data centers. Instead of every user reaching your VPS directly, a CDN caches and delivers content from the nearest node to your visitors. This leads to:

  • 🔹 Faster page load times

  • 🔹 Lower bandwidth consumption on your VPS

  • 🔹 Better performance during traffic spikes

  • 🔹 Enhanced user experience for global users


🛠️ How to Set Up a CDN with Your VPS

  1. Choose a CDN Provider

    Popular options include:

  2. Point Your Domain to the CDN

    • Update your DNS settings to route traffic through your CDN provider.

    • Many providers offer automatic SSL and DNS protection as well.

  3. Configure Caching Rules

    • Set rules to cache static content like images, CSS, and JavaScript.

    • Bypass or limit caching for dynamic content as needed.

  4. Test Your Setup

    • Use tools like GTmetrix or Pingdom to check speed improvements from various regions.


📍 Bonus: Use VPS Hosting in Multiple Regions

At HostEONS, we offer VPS hosting from the following locations:

🇺🇸 Los Angeles | Dallas | Salt Lake City | Portland | New York | Miami

🇫🇷 Paris

🇩🇪 Frankfurt

If you serve users in specific regions, choose the VPS closest to them. Combine that with a CDN, and you’re guaranteed to deliver blazing-fast performance.

👉 Order Budget KVM VPS (US & EU)

👉 Order Ryzen KVM VPS

👉 Order Ryzen 7950X VDS


💳 Wide Range of Payment Options

We accept:

  • Credit/Debit Cards

  • PayPal

  • Cryptocurrency (BTC, USDT, ETH, LTC, and more)

  • Local methods like Alipay, UnionPay, OXXO (Mexico), Boleto (Brazil), Dragonpay (Philippines), UPI (India), and many others via international checkout.


✅ Conclusion

Adding a CDN to your VPS setup is one of the most effective ways to reduce latency and improve user experience for your global audience. Whether you run a blog, eCommerce site, or SaaS app — CDN integration is a smart move.

At HostEONS, we make it easy to build a fast and reliable hosting environment. Pair our high-performance VPS with a CDN and get the best of both worlds.

Logging or Showing Real IP in cPanel/Apache when using CloudFlare

We recently switched to CloudFlare for our own website but even after a lot of research could not find proper documentation moreover mod_cloudflare has been discontinued and all documents are too old, so here is how we fixed it.

  1. First login to WHM
  2. Customise your Apache config and under Apache Modules select mod_remoteip (yes we will use mod_remoteip instead of mod_cloudflare)
  3. Once Apache is recompiled now you need to edit a file with name “370_mod_remoteip.conf” it may be 360 or 350 or something else but last part will be “mod_remoteip.conf” and file is available in /etc/apache2/conf.modules.d.
  4. Just add following to above file:

RemoteIPHeader X-Real-IP
RemoteIPTrustedProxy 173.245.48.0/20
RemoteIPTrustedProxy 103.21.244.0/22
RemoteIPTrustedProxy 103.22.200.0/22
RemoteIPTrustedProxy 103.31.4.0/22
RemoteIPTrustedProxy 141.101.64.0/18
RemoteIPTrustedProxy 108.162.192.0/18
RemoteIPTrustedProxy 190.93.240.0/20
RemoteIPTrustedProxy 188.114.96.0/20
RemoteIPTrustedProxy 197.234.240.0/22
RemoteIPTrustedProxy 198.41.128.0/17
RemoteIPTrustedProxy 162.158.0.0/15
RemoteIPTrustedProxy 104.16.0.0/12
RemoteIPTrustedProxy 172.64.0.0/13
RemoteIPTrustedProxy 131.0.72.0/22
RemoteIPTrustedProxy 2400:cb00::/32
RemoteIPTrustedProxy 2606:4700::/32
RemoteIPTrustedProxy 2803:f800::/32
RemoteIPTrustedProxy 2405:b500::/32
RemoteIPTrustedProxy 2405:8100::/32
RemoteIPTrustedProxy 2a06:98c0::/29
RemoteIPTrustedProxy 2c0f:f248::/32

 

5. Now go to WHM and under “Apache Configuration” click on “Include Editor” then under “Pre Main Include” edit the file and add:

<IfModule remoteip_module>
RemoteIPHeader X-Forwarded-For
</IfModule>
<IfModule log_config_module>
LogFormat “%{Referer}i -> %U” referer
LogFormat “%{User-agent}i” agent
LogFormat “%a %l %u %t \”%r\” %>s %b” common
LogFormat “%a %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\”” combined
CustomLog logs/access_log combined
</IfModule>

 

Now just save and restart Apache, it should now start showing your real IP in apache logs etc…