How to Move a Static Site from Free Hosting to Hostinger

Move a site from Cloudflare Pages, Netlify, Vercel or GitHub Pages to Hostinger: when it's worth it, uploading, redirects, DNS and HTTPS, step by step.

An arrow moving a page from one box to another on a web services gradient background

This post explains how to move a static website from free hosting to Hostinger. Free static hosts like Cloudflare Pages, Netlify, Vercel and GitHub Pages are excellent for plain HTML sites, blogs and portfolios, and I recommend them in our list of the best free static website hosting services. But sooner or later some sites need things a static host can’t do, and moving to regular web hosting is the simplest fix.

This guide covers when a move is actually worth it, how to upload your site, how to rebuild the redirects and headers that don’t carry over, and how to switch DNS without downtime.

This post contains affiliate links. See our affiliate disclaimer.

Highlights:

  • Decide first: many sites should stay on free static hosting.
  • Three ways to upload: File Manager, FTP or Git.
  • Convert _redirects, _headers and vercel.json rules to .htaccess.
  • Switch DNS with no downtime by keeping the old host live until the change finishes.

Is Moving Worth It?

Moving costs money and usually makes a static site slightly less robust: free static hosts serve every file from a global CDN, while shared hosting serves from one data center (optionally with a CDN in front). So only move if you need something the static host can’t give you.

Good reasons to move:

  • You want to add WordPress or another PHP app (a shop, a forum, a booking system) next to or instead of the static site.
  • You want email on your own domain with real mailboxes, not just forwarding.
  • You want several sites, databases and email in one account instead of a free service for each.
  • Your site outgrew a free plan’s limits, such as Netlify’s credits or Vercel’s non-commercial rule for its Hobby plan.

Reasons to stay:

  • Your site is purely static and within the free limits. Cloudflare Pages in particular has unmetered static bandwidth and allows commercial use.
  • You rely on serverless functions, deploy previews or built-in form handling. These do not exist on shared hosting and would need to be rebuilt.

If you’re staying, you can still get a domain email address without moving; see “Need a Permanent Address?” in our temporary email guide.

What Changes After the Move

Feature on your static host On Hostinger shared hosting
Deploy on every git push, with a build step Upload the built files, or deploy with Git or GitHub Actions (see Step 2)
_redirects / _headers / vercel.json .htaccess rules (see Step 3)
Serverless functions PHP, or a Node.js app on plans that support it
Global CDN One data center; CDN available as an option
Free HTTPS Free SSL, enabled per domain
Deploy previews per branch Not available

Step 1: Choose a Plan

For a static site plus a few extras, the cheapest shared hosting plan is enough. At the time of writing, Hostinger’s Premium plan costs $2.99/month for up to 3 websites, including a free domain for the first year, free SSL and email mailboxes. That price needs a 48-month prepayment and renews at $10.99/month, so compare the full-term cost.

If your site is built with a framework like Astro, Next.js or Vite and you’d like Hostinger to build it from GitHub for you, you need a plan with Node.js web app support, which starts one tier higher.

See Hostinger plans

During setup, add your domain to the hosting account, but don’t change the DNS yet. You’ll upload and test the site first.

Step 2: Upload Your Site

First, get the built version of your site: the folder your static host actually serves. For plain HTML sites that is your project folder; for generators it’s usually dist/ (Astro, Vite), public/ (Hugo), _site/ (Jekyll, Eleventy) or out/ (Next.js static export). Build it locally with your usual command, for example npm run build.

Then upload it into your domain’s public_html folder using one of these methods:

Option A: File Manager (easiest). In hPanel, open Websites, click Dashboard next to your site and open File Manager. Go into public_html, delete the default placeholder file, upload a ZIP of your build folder and extract it there. Make sure index.html ends up directly inside public_html, not in a subfolder.

Option B: FTP. Create an FTP account in hPanel and upload the build folder’s contents with a client like FileZilla. This is handy for sites with many files.

Option C: Automatic deploys from GitHub. hPanel’s Git feature clones a repository into your site folder, but it doesn’t run a build step. For a generator-based site, the usual approach is a GitHub Actions workflow that builds the site and uploads it over FTP on every push, which gets you close to the static-host experience:

name: Deploy to Hostinger
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: npm ci && npm run build
      - uses: SamKirkland/[email protected]
        with:
          server: ${{ secrets.FTP_SERVER }}
          username: ${{ secrets.FTP_USERNAME }}
          password: ${{ secrets.FTP_PASSWORD }}
          local-dir: ./dist/
          server-dir: ./public_html/

Store the FTP details as repository secrets under Settings > Secrets and variables > Actions.

Step 3: Recreate Redirects, Headers and the 404 Page

Hostinger’s shared hosting runs on LiteSpeed, which reads Apache-style .htaccess files. Files like _redirects, _headers and vercel.json are ignored, so convert their rules into a .htaccess file in public_html.

Redirects. A Netlify or Cloudflare Pages rule like this:

/old-page/  /new-page/  301

becomes:

Redirect 301 /old-page/ /new-page/

For patterns, use RedirectMatch, for example sending everything under /blog/ to /articles/:

RedirectMatch 301 ^/blog/(.*)$ /articles/$1

Custom 404 page. Static hosts pick up 404.html automatically; on Hostinger, tell the server about it:

ErrorDocument 404 /404.html

Force HTTPS. Once SSL is active (Step 5), redirect all HTTP traffic:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]

hPanel may also offer a force-HTTPS switch, in which case you don’t need this rule.

Headers. A _headers rule that sets long caching for assets can be written as:

<IfModule mod_headers.c>
  <FilesMatch "\.(css|js|woff2|webp|avif|png|jpg|svg)$">
    Header set Cache-Control "public, max-age=31536000, immutable"
  </FilesMatch>
</IfModule>

Only use immutable caching if your generator puts a hash in asset file names (Astro, Vite and Next.js do). Otherwise, use a shorter max-age.

Step 4: Test Before Switching DNS

Before any real visitor reaches the new server, check the site on it:

  • Use Hostinger’s temporary domain or preview link for your site, if available.
  • Or edit your computer’s hosts file to point your domain at the new server’s IP address, so only your computer sees the new host.

Click through the main pages, test a few old URLs that should redirect, open a page that doesn’t exist to see your 404 page, and check images and fonts in the browser’s developer tools.

Step 5: Switch DNS Without Downtime

  1. A day before, lower the TTL of your domain’s DNS records to 300 seconds (5 minutes), so the switch takes effect quickly.
  2. Point the domain to Hostinger. Either change the domain’s nameservers to Hostinger’s or keep your current DNS provider and change the A record (and www CNAME) to the addresses shown in hPanel.
  3. Copy your other DNS records first. If you change nameservers, records for email (MX, SPF, DKIM), domain verifications and subdomains don’t move automatically. Recreate them in Hostinger’s DNS editor before switching, or your email may stop working.
  4. Enable SSL for the domain in hPanel once the domain points to Hostinger, then add the force-HTTPS rule from Step 3.
  5. Keep the old host running for a few days. Visitors whose DNS hasn’t updated yet still get a working site, so there is no downtime.

Step 6: After the Move

  • In Google Search Console, check that the site is still verified and resubmit your sitemap.
  • Watch for 404 errors over the next weeks and add redirects for any old URLs you missed.
  • Disconnect the custom domain from your old static host, then delete the old project once you’re sure you won’t need it.
  • If you used form handling or serverless functions on the old host, make sure their replacements work.

Is Hostinger a Good Choice for This?

What works well: it’s one of the cheapest ways to get PHP, databases, email and several sites in one place, the free domain and SSL cover the basics, and hPanel is easy to use even if you’ve never managed hosting before.

What to watch out for: the advertised price needs a long prepayment and renews much higher, you lose the global CDN, branch previews and serverless functions of a modern static host, and support is chat-based with mixed reviews. If all you need is to serve static files, the free host you already have is probably the better deal.

See Hostinger plans

Final Thoughts:

Moving a static site to Hostinger takes an afternoon: build it, upload it to public_html, convert your redirect and header rules to .htaccess, test it on the new server, and switch DNS while the old host is still live. Just be sure you’re moving for a real reason, such as WordPress, email or several sites under one roof, because for a purely static site, free hosting is hard to beat.