Running a Node daemon on shared hosting is an exercise in frustration. CloudLinux LVE limits kill your processes, PM2 restarts silently in the background, and you will inevitably run into 503 errors the moment your traffic spikes. If your site is a marketing page, a blog, or a documentation hub, you do not need a persistent Node server chewing through memory.
Instead, let Nitro prerender everything into raw HTML, CSS, and client-side JavaScript. From there, you can drop the bundle onto Hostinger’s LiteSpeed web server, wire up Namecheap DNS, and cache the whole thing at the edge with StackPath CDN.

The Architecture: Static Generation vs Node Daemon
Nuxt 3 defaults to a server-side rendered (SSR) setup running on Nitro. That is great if you have per-request user sessions or direct database queries on every page hit. But on a shared hosting plan, keeping that runtime alive is fragile. Static prerendering gives you the speed of a flat file server with the developer ergonomics of Vue components.
When you trigger a static build, Nitro crawls every internal link, executes your components, pulls data, and dumps static HTML files alongside content-hashed JS bundles. Here is the topology we are setting up:
- Build Environment: Node 18+ generating the static bundle into
.output/publiclocally or in CI. - Origin Server: Hostinger serving those raw assets via LiteSpeed with practically zero memory footprint.
- Edge CDN: StackPath terminating TLS, caching pages globally, and proxying cache misses to Hostinger.
- DNS: Namecheap routing your apex and subdomains over to StackPath.
If this layout looks familiar, it is because it works. We used the same pattern when we walked through how to deploy an Astro static site on Hostinger with Namecheap and StackPath and how to deploy Next.js static export on Hostinger with Namecheap and StackPath.
Configure Nuxt 3 for Pure Static Export
By default, running npx nuxi build assumes a Node environment and spits out a server entry point inside .output/server. We need to tell Nuxt to bypass the server runtime and generate flat HTML files instead.
Open your nuxt.config.ts and add the static preset to the Nitro configuration:
// nuxt.config.ts
export default defineNuxtConfig({ ssr: true, nitro: { preset: 'static', prerender: { crawlLinks: true, routes: ['/sitemap.xml', '/404.html'] } }, app: { head: { htmlAttrs: { lang: 'en' }, meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' } ] } }, typescript: { strict: true }
})Keeping ssr: true alongside nitro.preset: 'static' ensures your pages get prerendered at build time, while still letting Vue hydrate on the client for SPA navigation. The crawlLinks: true flag tells Nitro to traverse every it finds.
If you have dynamic routes that aren’t linked directly from your navigation menus—like unindexed promo pages or thank-you screens—drop them straight into the nitro.prerender.routes array so Nitro doesn’t skip them.
Run the Build and Inspect the Output
Generate your production bundle using the Nuxt CLI:
# Clean existing artifacts and build
npx nuxi generateOnce Nitro wraps up, inspect the output directory:
# Verify the structure
ls -la .output/public/The only thing you care about is .output/public/. That folder holds your compiled index.html, route-specific HTML files, the 404.html fallback, and the _nuxt folder containing your hashed JavaScript and CSS. This directory is your entire deployment artifact.
Prepare the Hostinger Web Root and .htaccess
Log into Hostinger’s hPanel, open File Manager, or connect via SFTP. Your site files belong inside public_html/.
Wipe any placeholder files Hostinger created (like default.php). Then upload the contents of .output/public/ directly into public_html/. Do not upload the public directory itself—your index.html needs to live at the root of public_html/.
Because Hostinger runs LiteSpeed, it reads standard Apache .htaccess directives out of the box. We will use it to set aggressive cache headers for immutable assets and ensure clean route handling. Create an .htaccess file inside public_html/:
# Enable Rewrite Engine
RewriteEngine On
RewriteBase / # Force HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Serve existing directory or file directly
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L] # Fallback for dynamic sub-routes to 404 or index
RewriteRule ^ index.html [L] # Set long cache headers on immutable Nuxt assets
ExpiresActive On ExpiresDefault "access plus 1 month" ExpiresByType text/html "access plus 0 seconds" ExpiresByType application/json "access plus 0 seconds" ExpiresByType text/css "access plus 1 year" ExpiresByType application/javascript "access plus 1 year" ExpiresByType image/webp "access plus 1 year" ExpiresByType image/svg+xml "access plus 1 year"
# Cache-Control headers
Header set Cache-Control "no-cache, no-store, must-revalidate" Header set Cache-Control "public, max-age=31536000, immutable"
This configuration tells browsers to revalidate HTML files on every hit so users get fresh deploys instantly, while locking the hashed files in _nuxt/ into browser caches for a full year. If you run into cross-origin issues with fonts later, check our guide on how to fix CORS errors on web fonts and static assets in StackPath CDN.
Configure StackPath CDN for the Nuxt Origin
Next, put StackPath’s edge network in front of Hostinger so requests never hammer your origin server directly. Open your StackPath console and create a new CDN Site:
- Delivery Domain: Enter your live site domain (e.g.,
example.com). - Origin Type: Select IP Address or Hostname.
- Origin IP / Hostname: Use your dedicated or shared server IP from Hostinger hPanel. Do not type your domain name here if you plan to point that same domain at StackPath—you will create an infinite redirect loop.
- Origin Port: Pick
443for HTTPS (make sure SSL is active on Hostinger first) or80if testing plain HTTP.
After creating the site, head to EdgeRules. If your site handles sudden traffic bursts, look into how to prevent CDN cache stampedes with Origin Shield and stale-while-revalidate.
Under Cache Settings, set up these defaults:
- Default TTL:
86400seconds (24 hours). - Browser TTL: Select Respect Origin Headers so our
.htaccessrules stay in control. - Query String Caching: Choose Cache with Query Strings or ignore them, depending on whether client components parse query parameters.
StackPath will display an Edge Address (something like c2k4n7.stackpathcdn.com). Copy that address—you need it for your DNS records.
Set Up Namecheap DNS Records
Now switch to Namecheap. Go to your Domain List, hit Manage next to your domain, and click the Advanced DNS tab.
Delete any default parking records. How you set this up depends on whether you run your primary traffic on the root domain or www. If you are debating between the two, read our guide on A record vs CNAME for root domain in Namecheap DNS.
For a standard apex configuration, point your traffic to StackPath like this:
# Host records in Namecheap Advanced DNS # If using www subdomain as canonical:
Type: CNAME Record
Host: www
Value: c2k4n7.stackpathcdn.com.
TTL: Automatic # Root domain redirect to www (or ALIAS if supported):
Type: URL Redirect Record
Host: @
Value: https://www.example.com
Type: Permanent (301)Using an ALIAS record for the @ apex hostname lets Namecheap resolve the StackPath CDN endpoint to dynamic A records automatically at query time.
SSL Handshake: Namecheap, StackPath, and Hostinger
The most common bug I run into with this architecture is an SSL handshake failure (usually a 525 or 526 error). You have two distinct network legs, and both need valid TLS certificates:
- Origin SSL (Hostinger): Install a Let’s Encrypt certificate inside hPanel before updating DNS, or use DNS challenge validation. If Hostinger cannot verify the domain because DNS already points to StackPath, the origin connection will drop.
- Edge SSL (StackPath): Inside StackPath, open the SSL tab and issue a free Let’s Encrypt edge cert. This works as soon as your Namecheap records propagate.
- Edge-to-Origin Protocol: In StackPath’s origin settings, set the protocol explicitly to HTTPS on port 443. Never pull unencrypted traffic from Hostinger over port 80 in production.
If you hit certificate renewal snags or redirect loops, see our step-by-step breakdown on how to connect Namecheap domain to Hostinger with StackPath CDN and end-to-end SSL.
Testing TTFB and Cache Hits
Wait a few minutes for Namecheap DNS to propagate, then test the endpoint with curl to verify response headers:
# Inspect headers from the CDN edge
curl -I -s https://www.example.com/ | grep -E "(HTTP/|x-hw|cache-control|server)"You should see something like this:
HTTP/2 200
server: NetDNA-cache/2.2
cache-control: no-cache, no-store, must-revalidate
x-hw: 1698243120.d02.phx1.t, 1698243120.c02.phx1.HNext, test a static script from the _nuxt/ directory:
curl -I -s https://www.example.com/_nuxt/entry.B3e8d91a.js | grep -E "(HTTP/|x-hw|cache-control)"On your first try, StackPath’s x-hw header will likely end in .M (a cache MISS). Fire the exact same request a second time. It should switch to .H (a cache HIT). On my test deployments, hitting an edge node dropped TTFB from 320ms on a cold Hostinger request down to 28ms from the CDN cache.
The Gotcha: Nuxt 3 Client Hydration Mismatches on 404 Pages
Here is an issue that bit me on my first build: navigating directly to an un-prerendered URL caused a brief white flash followed by a console error:
# Hydration mismatch warning in browser devtools
[Vue warn]: Hydration completed but contains mismatches.This happened because our fallback rule rewrote non-existent routes back to index.html. When the browser loaded the home page markup while the address bar still showed /some-random-route, Vue tried to mount the Home page layout against the active route, throwing an immediate hydration mismatch.
The fix: create an error.vue at your project root and make sure Nitro outputs a dedicated 404.html file. Then update your .htaccess fallback to point directly to 404.html instead of index.html:
# Replace the broad fallback with this:
ErrorDocument 404 /404.html # Only rewrite actual route directories to index.html if using SPA fallback:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ 404.html [L]This serves a clean 404 payload immediately without breaking Vue’s client-side router.
Automating Deployments via GitHub Actions
SFTP uploads get old fast. You can automate the entire build, static export, and upload process on every push to your main branch.
Add this workflow to .github/workflows/deploy.yml:
name: Deploy Nuxt 3 Static to Hostinger on: push: branches: - main jobs: build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20 cache: 'npm' - name: Install Dependencies run: npm ci - name: Generate Static Build run: npm run generate - name: Sync Files via SFTP uses: SamKirkland/FTP-Deploy-Action@v4.3.4 with: server: ${{ secrets.HOSTINGER_FTP_HOST }} username: ${{ secrets.HOSTINGER_FTP_USER }} password: ${{ secrets.HOSTINGER_FTP_PASSWORD }} local-dir: .output/public/ server-dir: public_html/ dangerous-clean-slate: falseSet HOSTINGER_FTP_HOST, HOSTINGER_FTP_USER, and HOSTINGER_FTP_PASSWORD in your repository secrets. The action runs the static build and syncs only modified files to Hostinger.
Frequently Asked Questions
Can I use Nuxt Server Routes (server/api) with this setup?
Only during the build. If your pages pull data using useAsyncData during static generation, Nitro evaluates those endpoints at build time and bakes the responses into the HTML and payload files. However, dynamic runtime endpoints that need to handle real-time POST requests or database writes will fail because there is no running Node process on Hostinger.
How do I purge the StackPath cache after a new deployment?
Head to Sites > your-site > Cache > Purge Cache in the StackPath portal. You can also script this via the StackPath API by adding a curl step to your GitHub Actions workflow right after the FTP deploy step.
Do I need to pay for Hostinger Business hosting for this?
No. The cheapest Single or Premium shared plans handle static files without breaking a sweat. Since LiteSpeed serves prebuilt files directly off the disk with zero Node runtime, memory usage on your Hostinger account stays negligible.
Why use StackPath if Hostinger already provides LiteSpeed Cache?
LiteSpeed Cache runs locally on Hostinger’s single server. StackPath places copies of your static files in points of presence across the world. An edge cache delivers assets from a server physically close to your user, cutting latency and keeping traffic spikes from overloading your shared hosting limits.
Next Steps
Your static Nuxt 3 site is now generated, shielded by dual-layer SSL, and served globally through StackPath’s edge cache. If you also build client-only SPAs with Vite, take a look at our guide on how to deploy a Vite React SPA on Hostinger with Namecheap and StackPath.

