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:
| Metric | Value |
|---|---|
| Performance | 60-70/100 |
| LCP mobile | ~4.5 seconds |
| CLS | 0.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
widthandheightin HTML .header-navmoved into critical CSS- Inter Fallback with
size-adjust: 107%andascent-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)
| Metric | Before | After |
|---|---|---|
| Performance | 60-70 | 94/100 |
| SEO | - | 100/100 |
| Accessibility | - | 97 |
| Best practices | - | 96 |
| FCP | - | 1.9 s |
| LCP | 4.5 s | 1.9 s |
| TBT | - | 20 ms |
| CLS | 0.377 | 0.001 |
| Speed Index | - | 5.5 s |
Desktop
| Metric | Value |
|---|---|
| Performance | 92/100 |
| LCP | 0.7 s |
| TBT | 20 ms |
| CLS | 0.085 |
| FCP | 0.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):
| Metric | Mobile | Desktop |
|---|---|---|
| TTFB median | ~1.13 seconds | ~0.98 seconds |
| TLS handshake | 470-580 ms | - |
| Total page time | 1.7-2.5 s | 1.6-1.7 s |
| HTTP | 200 | 200 |
| Cache | X-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:
- Optimize the code first. Image dimensions in HTML, critical CSS, fallback fonts with size-adjust, OPcache, WebP. No budget, with your own hands.
- 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.
- 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.
Useful links
- Cloudflare for a Russian site in 2026: why I picked Beget CDN - the same story from another angle, about regulatory risk.
- CLS 0.377 → 0.002 in a day - three critical CSS fixes, detailed breakdown.
- OPcache on shared: rules are invisible - about PHP cache on cheap hosting.
- Case study global-cleaning-spb.ru: 194 pages in Yandex in 50 days - the SEO story of the same site.
Want the same on your project? Book a one-off audit or get the full setup through SEO from scratch.