How to Host a Website on Hostinger: A Developer's Guide (2026)
Disclosure: Some links in this guide are referral links. If you sign up for Hostinger through them, ToolsHubKit may earn a commission, at no extra cost to you.
Pricing note: Hosting plans, features and promotional prices change often. Everything below describes how Hostinger works rather than exact numbers, so always confirm current plans and renewal prices on Hostinger's own site before you buy.
Hostinger is one of the most popular budget hosts in the world, and it's a common first stop for developers who want to get a portfolio, a client site or a side project online without paying cloud-provider prices. This guide walks through it from a developer's point of view: which plan type actually fits your project, and how to go from a Git repository to a live site with HTTPS.
Get started with Hostinger here
Step 1: Pick the Right Plan Type
Hostinger sells several kinds of hosting. Choosing the right type matters far more than choosing between tiers.
| You're running… | Choose | Why |
|---|---|---|
| A static site (HTML, React/Vue build, Next.js static export) | Shared web hosting | Cheapest option; upload the build folder and you're done |
| WordPress or a PHP app (Laravel, Symfony) | Shared or Cloud hosting | Managed PHP, databases and one-click installers in hPanel |
| A busy WordPress or PHP site | Cloud hosting | More dedicated resources while staying fully managed |
| Node.js, Python, Go, Docker, background workers | VPS | Full root access; run any runtime and keep processes alive |
Rule of thumb: if your app needs a process that runs continuously (an API server, a queue worker, a websocket server), you want a VPS. If it's files and PHP, managed hosting will save you hours of server maintenance.
What to compare between tiers
- SSH access: essential for Git workflows and Composer/npm commands
- Git deployment: available from hPanel on plans that include it
- Number of websites and databases: matters if you host client sites
- Backups: daily vs weekly, and whether restores are self-service
- Node.js web app support: newer Business and Cloud plans can run Node.js apps from hPanel; confirm it's included before you rely on it
- Renewal price: the introductory price usually applies to the first billing term only
Step 2: Get Familiar With hPanel
Instead of cPanel, Hostinger uses its own control panel, hPanel. Everything in this guide (domains, SSL, Git, cron jobs, databases, file manager) lives there. The areas you'll use most:
- Websites → Dashboard: per-site settings, file manager and resource usage
- Advanced → SSH Access: your SSH host, port and username
- Advanced → GIT: connect a repository for deploys
- Advanced → Cron Jobs: scheduled tasks
- Databases → MySQL Databases: create databases and users
- Security → SSL: install and check certificates
Step 3: Connect Your Domain
If you bought the domain through Hostinger, it's connected automatically. If your domain lives elsewhere, you have two options:
- Change nameservers to the ones hPanel shows you. Hostinger then manages all DNS records. This is the simplest option.
- Keep your DNS provider and point records at Hostinger: an
Arecord for@pointing to your hosting IP, and aCNAMEforwwwpointing to your root domain.
DNS changes usually take minutes, but can take up to 24–48 hours to propagate everywhere. Don't panic if the site doesn't appear immediately.
Step 4: Deploy Your Code With Git
Uploading files with FTP works, but Git deploys are repeatable and easy to roll back.
On shared and cloud hosting
- Open Advanced → GIT in hPanel.
- Enter your repository URL and branch (for private repos, add the deploy key hPanel generates to your GitHub repository's Deploy keys).
- Choose the install directory, usually
public_htmlfor the main domain. - Click Create, then Deploy.
- Optional: copy the webhook URL hPanel provides into GitHub (Settings → Webhooks) so every push redeploys automatically.
Static site builds: Git deploys copy your repository as-is; they don't run npm run build. Either commit your build output to a deploy branch, or build in GitHub Actions and push the output to a deploy branch that hPanel pulls from.
On a VPS
You have full control, so use whatever you like: git pull over SSH, a GitHub Actions workflow that SSHes in and restarts your service, or Docker images pushed to a registry. The cURL Generator is handy for building and testing the deploy-hook and health-check requests along the way.
Step 5: Turn On HTTPS
On hosting plans, open Security → SSL, select your domain and install the free certificate. Then:
- Enable Force HTTPS so
http://requests redirect tohttps://. - Check for mixed content: images or scripts still loaded over
http://will trigger browser warnings. - After switching, confirm that redirects return
301, not302. If you're unsure what a status code means, look it up in the HTTP Status Codes reference.
On a VPS, install a reverse proxy (Nginx or Caddy) and use Certbot with Let's Encrypt, or let Caddy obtain certificates automatically.
Step 6: Schedule Cron Jobs
Laravel's scheduler, WordPress's real cron, nightly backups and cleanup scripts all need cron. In hPanel, open Advanced → Cron Jobs, pick the command and set the schedule.
Cron syntax trips everyone up eventually. Build and sanity-check the expression with the Cron Expression Builder before saving it. For example, Laravel's scheduler needs to run every minute:
* * * * * cd /home/USERNAME/domains/example.com/public_html && php artisan schedule:run >> /dev/null 2>&1
Replace the path with the one shown in your site's file manager.
Step 7 (VPS Only): Run Your App in Docker
Hostinger's VPS plans let you choose an operating system template when you set the server up, including plain Ubuntu and templates with Docker preinstalled. A minimal production setup looks like this:
- Harden SSH: log in with a key, create a non-root user, and disable password login.
- Enable a firewall: allow only ports
22,80and443. - Containerize the app: generate a production-ready starting point with the Dockerfile Generator.
- Run behind a reverse proxy: Nginx or Caddy in front of your container, terminating TLS.
- Keep it running: use
restart: unless-stoppedin Docker Compose so the app survives reboots.
services:
app:
build: .
restart: unless-stopped
env_file: .env
ports:
- "127.0.0.1:3000:3000"
Binding to 127.0.0.1 keeps the container reachable only through your reverse proxy, never directly from the internet.
Step 8: Lock Down Secrets and Databases
- Database credentials: create a dedicated MySQL user per app with access only to its own database. Generate a long random password with the Password Generator.
- Environment files: keep
.envout ofpublic_htmland out of Git. On shared hosting, place it one directory above the web root when your framework allows it. - Webhooks: if your app receives webhooks (Stripe, GitHub, Shopify), always verify their signatures. The Webhook Signature Verifier helps you debug mismatches locally.
Common Problems and Quick Fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| Default Hostinger page still shows | Files deployed to the wrong directory | Deploy into public_html (or the directory your domain points to) |
500 Internal Server Error after deploy |
PHP version mismatch or missing dependencies | Set the PHP version in hPanel; run composer install --no-dev over SSH |
| Site loads over HTTP only | SSL not installed or Force HTTPS off | Install the certificate, then enable Force HTTPS |
Single-page app routes return 404 on refresh |
Server doesn't fall back to index.html |
Add an .htaccess rewrite to index.html for unknown paths |
| Node app stops after closing SSH | Process not managed | Use PM2, systemd or Docker with a restart policy |
For the single-page app case, this .htaccess in public_html sends unknown routes to your app:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.html [L]
Is Hostinger the Right Choice?
Hostinger is a strong pick if you want low-cost managed hosting for static sites, WordPress or PHP apps, a single dashboard for domains, email and SSL, or an affordable VPS to learn server administration on.
Look elsewhere if you need a large catalogue of managed cloud services (queues, managed Kubernetes, serverless functions) or multi-region infrastructure. For that kind of project, see our DigitalOcean vs AWS vs Hetzner comparison.
For most portfolios, client sites, blogs and side projects, Hostinger gets you live quickly and cheaply, and the VPS line gives you somewhere to grow.
Sign up for Hostinger with our referral link and use the steps above to get your first site online.
Useful Links
| Resource | Link |
|---|---|
| Hostinger (referral link) | Sign up here |
| Cron Expression Builder | /tool/cron-builder |
| Dockerfile Generator | /tool/dockerfile-generator |
| HTTP Status Codes | /tool/http-status-codes |
| Password Generator | /tool/password-gen |