Setup & Tech Guides9 min read•Last updated: •By SkyRain Cloud Team

How to Configure a CDN with Your Dedicated Server

Your dedicated server is fast, but it sits in one place, and every image, script and video travels from there to every visitor. During a sale or a viral moment, that one machine also serves every request. Learning how to set up a CDN with a dedicated server spreads that work across a global network of edge locations, so pages load faster, your server does less and your origin is harder to attack.

The short answer: point your domain's DNS through the CDN, configure your dedicated server as the origin with valid HTTPS, set cache rules for static files and cacheable pages, bypass the cache for carts and logged-in users, and restrict the origin to accept web traffic only from the CDN. This guide walks through each step, explains SSL modes and purging, and lists the mistakes that cause broken pages or leaked origins.

Quick answer

To configure a CDN with your dedicated server: sign up with a CDN, set your server as the origin, route your domain through the CDN (via nameservers or a CNAME), use full end-to-end HTTPS with a valid certificate on the origin, cache static assets with long lifetimes and versioned filenames, optionally cache anonymous HTML, bypass carts, checkout and logged-in sessions, purge on deploys, and firewall the origin so only CDN IP ranges can reach ports 80 and 443.

What a CDN does for a dedicated server

A content delivery network keeps copies of your files on servers in many cities. A visitor in Chennai gets images from a nearby edge location instead of from your origin; your server only sends each file to the CDN occasionally. Cloudflare's explainer on what a CDN is covers the basics.

  • Speed: shorter distances for static files, especially for visitors far from your data center.
  • Load: fewer requests and less bandwidth on your server.
  • Resilience: cached content can stay available during short origin problems.
  • Protection: the CDN absorbs much Layer 7 abuse and hides your origin IP.
CDN with a dedicated server – SkyRain Cloud bare metal servers in India

CDN with a dedicated server: step-by-step setup

  1. Prepare the origin: make sure your site works over HTTPS with a valid certificate on the dedicated server.
  2. Add your domain to the CDN and choose how traffic is routed: change nameservers to the CDN, or point a CNAME (for example www) to a CDN hostname.
  3. Set the origin address to your server's IP or a dedicated origin hostname such as origin.example.in.
  4. Choose full, strict HTTPS between CDN and origin so traffic is encrypted end to end and the certificate is verified.
  5. Create cache rules for static assets and, if appropriate, anonymous HTML.
  6. Add bypass rules for cart, checkout, account, admin and API paths.
  7. Restrict the origin firewall to the CDN's published IP ranges for ports 80 and 443.
  8. Configure real client IPs on the origin so logs and rate limits see visitors, not the CDN.
  9. Test thoroughly, then monitor cache hit ratio and errors.

SSL modes explained

ModeVisitor → CDNCDN → originRecommendation
Flexible / no origin TLSEncryptedPlain HTTPAvoid; data travels unencrypted to your server and redirect loops are common
Full (no verification)EncryptedEncrypted, certificate not checkedBetter, but not ideal
Full strictEncryptedEncrypted and verifiedUse this, with a public or CDN-issued origin certificate

Cache rules that work

ContentCache?Suggested lifetime
Images, fonts, CSS, JS with versioned filenamesYesLong (weeks to a year)
Product and blog pages for anonymous visitorsOptionalShort (minutes), purge on update
Cart, checkout, account, adminNeverBypass
APIsUsually noOnly specific public GET endpoints
Video segments (HLS/DASH)YesLong; segments do not change

Use cookies and headers to decide: if a session or cart cookie is present, bypass the HTML cache. Send correct Cache-Control headers from your origin so the CDN and browsers agree.

Protect and hide the origin

A CDN only protects you if attackers cannot go around it. After setup:

  • Allow ports 80 and 443 only from the CDN's IP ranges.
  • Remove or change DNS records that point directly to the server (old A records for mail, FTP or test subdomains).
  • Send email through a separate IP or provider so mail headers do not reveal the web server.
  • Consider a new origin IP if the old one was public for a long time.

Combined with your provider's network filtering, this is a strong defence; see protecting a dedicated server from DDoS. The reverse proxy on the origin is where you set headers and real-IP handling; see setting up a reverse proxy.

Purging and deployments

When you deploy new CSS or JavaScript, use versioned filenames (for example app.3f2a1.css) so you never need to purge them. For HTML and images that change in place, purge the specific URLs after updates, or use a plugin or deployment hook that purges automatically. Avoid purging everything during peak traffic, which sends a sudden wave of requests to your origin. If you must clear everything, do it at a quiet hour and watch origin CPU and response times for the next few minutes.

How a CDN changes bandwidth and costs

With a high cache hit ratio, most image and script traffic never reaches your server, which keeps your 1 Gbps port free for dynamic requests and reduces total data transfer. For media-heavy sites the effect is dramatic. Our guide on bandwidth vs data transfer explains why this matters for capacity planning.

Choosing a CDN for an Indian audience

CDNs differ in where their edge locations are, how they price traffic and what security features they include. For visitors mainly in India, check that the CDN has edge locations in several Indian cities, not only in Singapore or Europe, and test response times from your customers' networks. Compare whether pricing is a flat plan or per gigabyte, whether image optimisation, a web application firewall and bot protection are included, and how cache purging and rules are configured. Start with one domain, measure cache hit ratio and speed for a couple of weeks, and only then move more sites over.

Testing your CDN setup

  1. Check response headers for cache status (HIT or MISS) on assets and pages.
  2. Log in and confirm you never see another user's cart or account.
  3. Run a test checkout end to end.
  4. Try reaching the origin IP directly; it should refuse web traffic.
  5. Measure page speed from several Indian cities and mobile connections.

Page speed tuning on the origin itself is covered in optimising page speed on a dedicated server.

A hypothetical rollout

A furniture brand's site serves large product photos directly from its dedicated server. During a sale, the port fills and pages slow down. The team puts the domain behind a CDN, caches images and assets for a year with versioned filenames, caches anonymous category pages for five minutes, bypasses cart and account cookies, and restricts the origin firewall to CDN ranges. At the next sale, most bandwidth is served from the edge, the server's CPU and port stay calm, and checkout remains fast.

CDN mistakes to avoid

  • Caching pages for logged-in users or carts, showing one customer another's data.
  • Using flexible SSL, causing redirect loops and unencrypted origin traffic.
  • Leaving the origin open to the internet after adding the CDN.
  • Purging the whole cache at the busiest time of day.
  • Forgetting to restore real visitor IPs, breaking logs and rate limits.
  • No versioned filenames, so visitors see old CSS after a deploy.

Why businesses choose SkyRain Cloud dedicated servers

A CDN works best with a fast, reliable origin. SkyRain Cloud Intel Xeon dedicated servers provide:

  • Indian data centers, Indian latency. Intel Xeon dedicated servers are hosted in Mumbai and Delhi, close to customers across India.
  • The whole machine is yours. 100% unshared hardware: no other tenants competing for CPU, memory or disk.
  • DDoS protection included on the network, so a flood aimed at your IP does not have to become your problem alone.
  • Full control. Root or Administrator access plus iLO/IPMI out-of-band management to reboot, reinstall or mount your own ISO.
  • Real support channels. 24/7 support tickets, WhatsApp and a Discord community, plus a public status page.
  • Simple billing. Monthly billing in rupees with UPI, net banking and cards.

Frequently Asked Questions

Do I need a CDN if I have a dedicated server?
Not always, but it helps most sites. A CDN speeds up static files for distant visitors, reduces load and bandwidth on your server and helps hide your origin IP.
Which SSL mode should I use between the CDN and my server?
Use full strict mode, where traffic between the CDN and your server is encrypted and the origin certificate is verified. Avoid flexible modes that send plain HTTP to the origin.
Can a CDN cache WooCommerce or other store pages?
It can cache product and category pages for anonymous visitors, but carts, checkout and account pages must bypass the cache based on cookies and paths.
How do I stop people bypassing the CDN?
Allow web ports only from the CDN's published IP ranges, remove DNS records that point directly to the server, and send email from a separate IP or provider.
Will a CDN reduce my server's bandwidth use?
Yes, often dramatically for image and media-heavy sites, because cached files are served from the edge instead of your server.
Can I use a CDN with a SkyRain Cloud dedicated server?
Yes. Any CDN can use your SkyRain Cloud server as its origin, and you have full root access to configure HTTPS, cache headers and firewall rules.

Conclusion

A CDN with a dedicated server combines a powerful origin with a global edge: faster pages, less load and a hidden, protected server. Set full strict HTTPS, cache static files aggressively, bypass anything personal, firewall the origin and test carefully.

Compare the plans below, or order your origin server on our Intel Xeon dedicated server store page.

SkyRain Cloud Dedicated Server Plans

Unshared Intel Xeon bare-metal servers in Mumbai and Delhi data centers with 1 Gbps connectivity. Every plan includes iLO / IPMI out-of-band management, DDoS protection, Full root / Administrator access, Additional IPv4 addresses available and Billed monthly.

PlanCores / ThreadsRAMStorageNetworkPriceGood forBuy
Business
2× Intel Xeon E5-2699 v4 (Mumbai / Delhi)
44 / 88 (2.2 GHz base, 3.6 GHz turbo)128 GB DDR4 ECC1 TB NVMe SSD1 Gbps₹17,999/monthBusiness websites, stores, databases, ERP and many client sitesOrder
Enterprise
2× Intel Xeon Platinum 8269CY (Mumbai / Delhi)
52 / 104 (2.5 GHz base, 3.8 GHz turbo)128 GB DDR4 ECC1 TB NVMe SSD1 Gbps₹19,999/monthVirtualization hosts, large databases, SaaS and container platformsOrder
CustomMore RAM or storage, a second server for failover, or several servers for a cluster: quoted by the team.Clusters, failover pairs, unusual specsAsk

Prices are monthly in INR as listed on the SkyRain Cloud store (verified 2026-11-23). Live stock and final price are shown at checkout.

Instant UPI • ₹649/mo
Fast KVM Cloud Provisioning