Next.js is slow on shared hosting because most shared plans cannot keep a Node process running. Each cold request restarts the application before any code executes, adding a real but currently unmeasured delay on this site — see the four measurements below to quantify it on your own setup. Shared CPU allocation then throttles rendering further under load.
Read the script
This is a spoken summary of the guide to why Next dot J S is slow on shared hosting. The four measurements, the code and the symptom tables are on the page.
The short answer. Next dot J S is slow on shared hosting because most shared plans can't keep a Node process running. Each cold request restarts the application before any code executes, adding a real delay. Shared C P U limits then throttle rendering further under load. The guide gives four measurements to quantify it on your own setup. Nothing here is measured on this site yet.
The takeaways. Cold starts are the usual cause: with no persistent Node process, every request pays initialisation cost. Four measurements identify the culprit: isolated time to first byte, cold versus warm, static versus rendered, and behaviour under concurrency. Time to first byte feeds L C P directly, so a five hundred millisecond server delay pushes L C P five hundred milliseconds later whatever the front end does. A faster server doesn't fix slow code, because unindexed queries and oversized images follow you to the new host. And static export sidesteps the problem entirely if your app can live without server rendering.
The mismatch. Shared hosting was built for P H P, which starts fresh on every request and costs a few milliseconds to do so. Next dot J S expects a long-lived Node process that starts once and serves thousands of requests. When a shared host advertises Node support, it usually means a process manager that starts your app on demand and stops it after a short idle period. That is tolerable with steady traffic. For sporadic traffic, which describes most new sites, many visitors pay the full startup cost.
The four measurements, in order. One, isolate time to first byte, separate from download and render time. If it is high but total time is only slightly higher, the server is the problem. If it is low and total is high, the bottleneck is payload size. Two, compare cold against warm: request a route, wait five minutes, request it again, then immediately a third time. A cold request of twelve hundred milliseconds against a warm one of a hundred eighty means cold starts, and the fix is a persistent process. Nine hundred against eight fifty means sustained slowness in the app or database, not hosting. Two twenty against one ninety means the server is fine, so look at payload. Three, compare a static file with a rendered route from the same host. A fast file next to a slow page puts the delay in application execution. Four, repeat under concurrency: ten simultaneous requests against your single-request figure. Shared hosting caps C P U per account, and the cap shows when several visitors arrive together. Measure from where your users are, not from next to the datacentre.
What the result means. A large cold-warm gap: no persistent process, and new hosting fixes it. Degrading under concurrency: shared C P U throttling, and new hosting fixes it. Uniformly slow: slow queries or blocking work in render, and new hosting does not fix it. Low first byte but high total time: oversized payload, no. Slow only from distant regions: a single-region origin, partly, so add a C D N.
Why it matters for search. Time to first byte is the starting point for L C P. Google also reduces crawl rate against consistently slow origins, which slows indexing of new content. Front-end optimisation alone plateaus, because a slow origin sets a floor under your metrics.
What to do. Cold starts: move to anything with a persistent process, a small V P S or a managed platform. C P U throttling: a V P S with guaranteed V C P Us. Uniformly slow: profile the render path. Only distant regions slow: put a C D N in front. No server rendering needed: export statically and host on a C D N.
Key takeaways
- Cold starts are the usual cause — no persistent Node process means every request pays initialisation cost.
- Four measurements identify the culprit: isolated TTFB, cold vs warm, static vs rendered, and behaviour under concurrency.
- TTFB feeds LCP directly. A 500 ms server delay pushes Largest Contentful Paint 500 ms later, whatever the front end does.
- A faster server does not fix slow code. Unindexed queries and oversized images follow you to the new host.
- Static export sidesteps the problem entirely if your app can live without server rendering.
Cold vs warm request: is hosting the problem?
The underlying mismatch
Shared hosting was built for PHP, which starts fresh on every request by design and costs a few milliseconds to do so. Next.js expects a long-lived Node process that starts once and serves thousands of requests. Running the second model on infrastructure built for the first is where the delay comes from.
When a shared host advertises Node support, it usually means a process manager that spawns your application on demand and reaps it after a short idle period. For a site with steady traffic that is tolerable. For a site with sporadic traffic — which describes most new sites — a large share of visitors pay the full startup cost.
- Cold start
- The delay when a request arrives and no warm process is available, forcing the runtime to initialise before application code runs. It is invisible in most benchmarking because repeated requests to the same route keep the process warm — you have to deliberately wait between requests to observe it.
Four measurements that identify the bottleneck
Run these in order. Each one rules something out, and together they distinguish the four common causes.
1. Isolate time to first byte
Browser dev tools blend server time with download and render time. Measure TTFB on its own:
curl -o /dev/null -s -w "ttfb: %{time_starttransfer}s total: %{time_total}s\n" https://example.com/
If TTFB is high but total time is only slightly higher, the server is the problem. If TTFB is low and total is high, your bottleneck is payload size, not hosting.
2. Compare cold against warm
Request a route, wait five minutes without touching the site, then request it again and immediately a third time. Compare the second and third figures.
| Cold request | Warm request | Diagnosis | Fix |
|---|---|---|---|
| 1,200 ms | 180 ms | Cold starts | Persistent process — VPS or managed platform |
| 900 ms | 850 ms | Sustained slowness | Application or database, not hosting |
| 220 ms | 190 ms | Server is fine | Look at payload and front end |
3. Static asset versus rendered route
Request a plain file — a CSS bundle or an image — and then a server-rendered page from the same host. A fast static file alongside a slow rendered page places the delay firmly in application execution, not network or bandwidth.
4. Repeat under concurrency
Issue ten simultaneous requests and compare the median against your single-request figure. Shared hosting caps CPU per account, and that cap becomes visible precisely when several visitors arrive together — which is the moment it matters most.
What each result actually means
| Symptom | Likely cause | Does new hosting fix it? |
|---|---|---|
| Large cold-warm gap | No persistent Node process | Yes |
| Degrades under concurrency | Shared CPU throttling | Yes |
| Uniformly slow, warm or cold | Slow queries or blocking work in render | No |
| Low TTFB, high total time | Oversized payload | No |
| Slow only from distant regions | Single-region origin, no CDN | Partly — add a CDN |
Why this shows up in search performance
Time to first byte is the starting point for Largest Contentful Paint, so a 500 millisecond server delay pushes LCP 500 milliseconds later no matter how well images and scripts are optimised. Google also reduces crawl rate against consistently slow origins, which slows how quickly new content gets indexed.
This is the practical link between infrastructure and rankings, and it is why front-end optimisation alone plateaus. You can compress every image and defer every script, and a slow origin still sets a floor under your metrics that no amount of front-end work penetrates.
What to actually do
- If cold starts are the cause: move to anything with a persistent process — a small VPS or a managed platform both solve it.
- If CPU throttling is the cause: a VPS with guaranteed vCPU. Shared plans cannot be tuned out of this.
- If it is uniformly slow: profile the render path. Unindexed queries and per-request API calls are the usual offenders, and both follow you to a new host.
- If only distant regions are slow: put a CDN in front. Cheaper and more effective than relocating the origin.
- If you do not need server rendering: export statically and host on a CDN. The problem disappears and the bill goes to roughly zero.
Sources and further reading
Primary documentation for the topics in this guide:
- How to self-host your Next.js application — nextjs.org