Skip to content

Deploy your Astro Site to Hostinger

How to deploy your Astro site to the web using Hostinger.

Hostinger is a web hosting provider that supports static sites and Node.js applications.

This guide covers deploying both static and server-rendered Astro projects to Hostinger using hPanel.

  • A Hostinger account with an active hosting plan.
    • Static site deployment is supported on all plans that include hPanel.
    • Server-rendered deployment requires a plan that supports Node.js applications, such as Business Web Hosting or Cloud hosting.
  • An Astro project ready to deploy.

Astro projects use output: 'static' by default, so no additional configuration is required to deploy a static site.

You can upload the contents of your dist/ folder to Hostinger using either the hPanel File Manager or an FTP client.

For on-demand rendering, deploy your Astro project as a Node.js application on a Hostinger plan that supports Node.js.

Add the Node.js adapter to enable on-demand rendering with the following astro add command:

Make sure your package.json has a start script that runs the built server:

package.json
{
"scripts": {
"start": "node ./dist/server/entry.mjs"
}
}