Beget CDN on Shared Hosting: What It Actually Does

Case study global-cleaning-spb.ru: Lighthouse mobile 60 → 94, LCP 4.5s → 1.9s, CLS 0.377 → 0.001. What Beget CDN actually did - and what was code optimization.

When you look at a site on shared hosting with Lighthouse 60-70 and an LCP of 4 seconds, the first temptation is to say ‘move to a VPS’. That’s expensive, requires sysadmin work, and rarely pays off on a B2B site with 10 thousand visitors a month.

On the global-cleaning-spb.ru project I took another route: enabled Beget CDN for static assets and optimized the code in parallel. Lighthouse mobile grew to 94/100, LCP to 1.9 seconds, CLS to 0.001. No migration. Here’s exactly what I did, and where the CDN helped - and where it didn’t.

In brief

  • Lighthouse mobile: 60-70 → 94/100 (Performance), 100/100 (SEO)
  • LCP mobile: 4.5 s → 1.9 s
  • CLS: 0.377 → 0.001
  • TBT: 20 ms
  • TTFB: stayed at ~1 second (the CDN doesn’t serve HTML)
  • Beget CDN serves CSS, JS, fonts, images. HTML stayed on shared.
  • Cloudflare doesn’t fit because of blocks in Russia - here’s why.

The ‘before’ picture

The site ran on Beget shared hosting without a CDN. Stack: PHP, no CMS, custom code. Lighthouse mobile looked like this:

MetricValue
Performance60-70/100
LCP mobile~4.5 seconds
CLS0.377
TTFB shared without CDN~944 ms (ceiling)

CLS 0.377 is the red zone - ranking gets cut both in Google and in Yandex since 2021. LCP 4.5 seconds means a mobile user on 4G sees a ‘white screen’ for almost the whole load. Lighthouse 60 means Google doesn’t consider the site ‘quality in terms of experience’.

What I did

Two parallel tracks: code optimization and CDN for static assets.

Part 1. Code optimization

This is what Beget CDN won’t do for you. A delivery network won’t fix CLS, won’t remove unused JS, won’t untangle the critical rendering path. Code first, infrastructure second.

CLS 0.377 → 0.002 in one day. Detailed breakdown in a separate article, in short:

  • The logo got explicit width and height in HTML
  • .header-nav moved into critical CSS
  • Inter Fallback with size-adjust: 107% and ascent-override: 90% based on Arial - killed the ‘jump’ when the font loads

After these three fixes CLS dropped 200x - from 0.377 to 0.002, then to 0.001. No CDN, no VPS, no frontend rewrite.

Self-hosted fonts. Inter Variable, font-display: swap. The font sits on my own hosting, not on third-party servers. Removed an external dependency that could block rendering.

WebP for all images. 192 links in 92 PHP files, converted in a day. 24 PNGs shrank by 71-97%, 108 JPGs - by 23-85%. Dimensions in HTML, loading="lazy" for everything below the first screen, fetchpriority="high" for the hero image.

OPcache on shared. PHP was rebuilding pages on every request. Enabled OPcache - PHP started serving cached bytecode. Details in a separate article about OPcache on shared.

Part 2. Beget CDN for static assets

In the Beget panel it’s one checkbox. After activation the site gets a CDN domain like ikeyegdufakeg.begetcdn.cloud, and all static content - CSS, JS, fonts, images - goes through edge servers in Russia.

I added the CDN domain to the site’s Content-Security-Policy so browsers would allow loading from it:

script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ikeyegdufakeg.begetcdn.cloud
style-src 'self' 'unsafe-inline' https://ikeyegdufakeg.begetcdn.cloud
font-src 'self' https://ikeyegdufakeg.begetcdn.cloud
img-src 'self' data: https://ikeyegdufakeg.begetcdn.cloud

That’s all. No DNS migrations, no moving the project to third-party servers. Same host, domain stays there, no regulatory risk.

The ‘after’ picture

PageSpeed Insights from June 1, 2026, Lighthouse 13.3.0:

Mobile (Moto G Power emulation, 4G slow)

MetricBeforeAfter
Performance60-7094/100
SEO-100/100
Accessibility-97
Best practices-96
FCP-1.9 s
LCP4.5 s1.9 s
TBT-20 ms
CLS0.3770.001
Speed Index-5.5 s

Desktop

MetricValue
Performance92/100
LCP0.7 s
TBT20 ms
CLS0.085
FCP0.6 s

Total Blocking Time of 20 ms is already about clean JS on the page, not about the delivery network. CLS 0.001 means ‘nothing moves at all’.

What Beget CDN did NOT do

This is the important part of the article, because marketing pieces about delivery networks usually skip it.

TTFB didn’t drop. Direct measurement on June 1 (5 requests with intervals):

MetricMobileDesktop
TTFB median~1.13 seconds~0.98 seconds
TLS handshake470-580 ms-
Total page time1.7-2.5 s1.6-1.7 s
HTTP200200
CacheX-Cache: HIT (Nginx)-

TTFB on shared Beget hits three walls: TLS handshake, PHP cold start and the shared server’s throughput. Edge helps with none of them, because the origin server serves the HTML.

If you see articles like ‘we enabled a CDN - TTFB dropped 5x’, they usually compare nginx + CDN against Apache without opcache. On comparable hardware a delivery network doesn’t reduce the TTFB of a dynamic page - it speeds up everything after the first byte.

Cache-Control isn’t inherited from .htaccess. If .htaccess has mod_expires with a year-long cache for static assets, that doesn’t reach the edge. The default cache is max-age=300 (5 minutes). For versioned URLs (with a hash in the filename) that’s too little - configure it through the Beget panel or live with the default.

Geography is Russia and CIS only. If 30% of your audience is in the EU or US, edge servers in Russia won’t help them. The global-cleaning-spb.ru audience is entirely in Russia - it works. For an international project this solution doesn’t fit.

Who this fits, who it doesn’t

Fits:

  • A local B2B site in Russia
  • Shared hosting, no desire to move to a VPS
  • Lighthouse currently 60-80, need to get to 90+
  • Audience entirely in Russia or CIS
  • Limited budget (free with paid Beget plans)

Doesn’t fit:

  • Global audience with Russia’s share < 50%
  • You need TTFB < 200 ms (only VPS + reverse proxy)
  • L7-level DDoS protection (Beget is not a WAF)
  • Serverless edge compute (Workers, R2) - you need Cloudflare or Yandex Cloud

What I’d do on a new project

The order is:

  1. Optimize the code first. Image dimensions in HTML, critical CSS, fallback fonts with size-adjust, OPcache, WebP. No budget, with your own hands.
  2. Then enable Beget CDN for static assets (or Yandex Cloud CDN, Selectel CDN if you’re not on Beget). Takes load off shared, frees up PHP processes.
  3. Only then think about a VPS. If after two steps Lighthouse is stuck and TTFB is still in the way - then migrate. In my case it never came to that.

Lighthouse 94 mobile on shared hosting isn’t ‘CDN magic’. It’s the sum of small code fixes plus offloading static assets through the host’s free delivery network.

Want the same on your project? Book a one-off audit or get the full setup through SEO from scratch.

Frequently asked questions

Is Beget CDN free or not?
Free if you have a paid Beget hosting plan. Enabled with one checkbox in the panel, serves static assets from edge servers in Russia. Traffic is free up to a certain limit, then daily billing in rubles. On my project with a B2B audience the free volume is enough with room to spare - I never hit the limit.
Does Beget CDN speed up TTFB or not?
No. TTFB is the first byte of HTML, and it's rendered by the origin server. On shared Beget, TTFB hits a ceiling of ~1 second because of a 470-580 ms TLS handshake and PHP cold start. The delivery network serves CSS, JS, fonts, images - everything after the HTML. If your goal is TTFB < 200 ms, go to a VPS with a reverse proxy.
Why bother with a CDN if it doesn't speed up TTFB?
It speeds up everything except the first byte - and that's a big contribution to Lighthouse. On global-cleaning-spb.ru static assets (CSS, JS, fonts, icons) go through Beget CDN, which cuts LCP and Speed Index. In parallel it offloads shared hosting - PHP processes don't serve static files, only HTML. Result as of June 1, 2026: Lighthouse mobile 94 on 4G slow, LCP 1.9s.
Isn't Cloudflare CDN better?
In Russia in 2024-2026 - no. Cloudflare is blocked via DPI at ISP level, and some users see the site slowly or with SSL failures. I covered this in detail in a [separate article](/en/blog/cloudflare-v-rf-pochemu-otkazalsya/). For a global audience Cloudflare still makes sense. For local Russian B2B - Beget CDN, Yandex Cloud CDN or Selectel CDN.
What definitely needs doing besides enabling the CDN?
Optimize the code first. A CDN won't fix a CLS of 0.377, won't reduce Total Blocking Time, won't pull out unused CSS. On global-cleaning-spb.ru that meant: explicit logo dimensions in HTML (width/height), header-nav in critical CSS, Inter Fallback with size-adjust:107% / ascent-override:90%. CLS dropped 200x precisely from three critical CSS fixes - before enabling the CDN, not after.
What are the downsides of Beget CDN?
Three. First: Russia and CIS only - if 30% of your audience is abroad, the edge servers don't help them. Second: Cache-Control from .htaccess isn't inherited - you have to configure it through the Beget panel or live with the default max-age=300. Third: static assets go through a CNAME domain (e.g. begetcdn.cloud), and some ad network anti-fraud systems don't understand that - test on pilot campaigns.
What if I'm not on Beget?
Yandex Cloud CDN or Selectel CDN - same edge servers across Russia, from 0.7 RUB per 1 GB outbound. Setup is more involved (CNAME to a separate domain, manual origin configuration), but it's not tied to your host. For most B2B projects the Lighthouse difference will be minimal.