Deploy Google AI Studio Websites & Web Apps

Publish your Google AI Studio website or web app on Hostinger using GitHub, and keep it updated.

Roadmap & resources

Save Your Project to GitHub

Connect Google AI Studio to GitHub

Open the website or web app you already built.

Open Google AI Studio

https://aistudio.google.com

Your app in Google AI Studio Settings GitHub

First time? Click "Sign in to GitHub to continue" Click "Install & Authorize" when prompted

Settings is the gear icon in the top-right corner. Already connected to GitHub? Go to the next task.

Create a GitHub Account

Only if you don't have one yet.

https://github.com/signup

Create a Repository and Save

A repository is your project's folder on GitHub. Hostinger reads your project from it.

Click "Create new repository" Enter a repository name. The description is optional Choose Private Click "Create GitHub repository" Click "Push changes to GitHub" Wait until the status says "GitHub & Google AI Studio are currently in sync"

That message confirms your project is saved.

Set Up Hostinger

Get Hostinger Hosting

You need a Hostinger plan that includes Web Apps. Already have one? Open your account and go to the next step.

Get Hostinger Web App Hosting

Choose a plan that includes Node.js Web Apps.

USED IN TUTORIAL

Create a Web App and Import Your Project

Hostinger Websites Create website Web App

Choose your domain, or a temporary domain to start Choose Import your Git repository Continue with GitHub and authorize Hostinger if asked Select the repository you saved in Step 1

Hostinger may show these as questions from its assistant instead of a form. The choices are the same.

Review Settings & Deploy

Review the Build Settings

Hostinger automatically detects your project's build settings. Check the selected framework, then continue if everything looks correct.

Not Sure About Your Build Settings?

Optional. Paste this into your Google AI Studio project and compare its answer with what Hostinger selected. It only reads your files.

Check this project's deployment settings for Hostinger. This is a read-only check. I am deploying this project to Hostinger as a Web App, imported from GitHub. Hostinger has already suggested build settings, and I want to confirm them against the real project. Inspect the actual project files: package.json, the lockfile, the build configuration and any server file. Do not guess from the preview or from how the app looks. Rules: - Do NOT change, create or delete any file. - Do NOT print the value of any API key or secret. Keep two things separate: - FRONTEND TOOLING: what builds the pages, for example Vite. - SERVER RUNTIME: whether a Node.js server must keep running in production, for example an Express server that serves the app or calls an API. If the project has a Node.js server that must keep running, the Hostinger framework preset should match that server, even when the pages are built with Vite. If there is no server, the preset should match the frontend build tool. Reply in this short format, as plain text and not JSON: Framework preset to choose in Hostinger: Needs a running Node.js backend: Yes or No, with a one-line reason Root directory: only if the app is not at the repository root Package manager: Build command: or "none needed" Server entry file: or "none" Node.js version: only if the project states one, otherwise "not specified" Mismatch to fix: anything that would break on Hostinger, or "none found" If you cannot verify a line from the files, write "not sure" instead of guessing.

Add Your Environment Variables

No variables listed? Skip this step.

Review the environment variables Hostinger detected Enter the values your project needs Click Continue

Secrets you saved in Google AI Studio are not copied to Hostinger, so enter them again here. If your project uses the Gemini API, create a key on this page:

Open Google AI Studio

API keys page

https://aistudio.google.com/apikey

IMPORTANT

Enter API keys only in Hostinger. Never put a private key in a variable that starts with VITE_, and never upload a .env file with real keys to GitHub.

Not sure which variables your project needs?

Find the Variables My Project Needs

Paste this into your Google AI Studio project. It lists the variable names your code really reads and changes nothing.

List the environment variables this project needs on Hostinger. This is a read-only check. Search the real source code for process.env and import.meta.env, and read any example environment file. Do not guess and do not invent names. Rules: - Do NOT change, create or delete any file. - Report variable NAMES only. Never print a value. - Do not suggest several names for the same key. Report the one name the code reads. For each variable, give one line: NAME, what it is for, Required or Optional, read on the SERVER or in BROWSER code Do not list variables the hosting platform normally sets by itself, such as NODE_ENV or PORT, unless the code cannot work without a value I must enter. Then add one last line: Private key exposed in browser code: Yes or No Answer Yes if a private key, such as a Gemini API key, is read through a VITE_ variable or otherwise ends up in code that runs in the browser.

Move a Private Key Out of Browser Code

Use this only if the check above says a private key is exposed in browser code. Variables that start with VITE_ are built into pages anyone can read.

A private API key in this project is read in browser code. Move it to the server so visitors can never see it. First confirm it from the real files: show me the file and line where browser code reads the key, without printing the key's value. If you cannot find one, stop and tell me. Do not change anything. If it is confirmed, make the smallest change that fixes it, and keep the design and every feature exactly as they are: - Call the API from a server route. Use the Node.js server the project already has. Add a minimal one only if there is none. - Read the key on the server from an environment variable that does NOT start with VITE_. - Make the browser code call my own server route instead of the API directly. - Remove the key from every file that is sent to the browser. Rules: - Never print the key's value. - Do not add a .env file with real keys to the repository. - Do not change unrelated code. When you finish, tell me: - the files you changed - the exact variable name to add in Hostinger - whether the project now needs a running Node.js server, so I can check the framework Hostinger selected

Deploy

Review the final configuration Click Deploy Wait for the build to finish Open the live website

If the build fails

Copy the error Hostinger shows, paste it into this prompt, and run it in your Google AI Studio project. Then save the fix to GitHub, or change the setting in Hostinger and redeploy.

Fix a Failed Deployment

Finds the real cause from your error and fixes only that.

My project failed to deploy on Hostinger. I deployed it as a Web App imported from GitHub. Here is the exact error from Hostinger's build log: [PASTE THE ERROR HERE] Here is what Hostinger selected: Framework: [PASTE IT HERE] Other build settings, if you can see them: [PASTE THEM HERE, OR DELETE THIS LINE] Find the real cause from this error and the actual project files: package.json, the build configuration and any server file. Do not try random changes, and do not invent a cause the error and the files do not support. If the error is not enough to be sure, tell me what else to copy from Hostinger. - If a Hostinger setting is wrong, tell me exactly which setting to change and to what. Do not change code for that. - If the code or configuration is wrong, fix only that. Keep the design and features the same. - Do not upgrade unrelated packages. - If the log contains a key or password, do not repeat it. Never print the value of an API key or secret. Reply with: Cause: What you changed, or which Hostinger setting to change: What I should do next:

Test & Update Your Website

Test the Live Website

Open your live website and make sure its pages and main features work.

If your project has AI features, sign-in or connected services, try those too.

If something doesn't work on the live website

Copy the prompt that matches your problem and run it in your Google AI Studio project. Then save the fix to GitHub.

Fix a Blank or White Page

The build finished, but the live website shows an empty page.

My project deployed to Hostinger without a build error, but the live website shows a blank page. It works in the Google AI Studio preview. Find what is different in production. Check the real project files for: - errors that only happen in the production build - asset and script paths that break outside the preview, including the base path in the build configuration - a server that does not serve the built files, or serves them from the wrong folder - a server that listens on a fixed port instead of the port the hosting gives it - code that needs an environment variable which is missing in production If I paste errors from the browser console below, start from them: [PASTE ANY BROWSER CONSOLE ERRORS HERE, OR DELETE THIS LINE] Base the fix on what you find in the files and the errors, not on guesses. If you cannot tell the cause, say what else I should copy for you. Keep the design and features exactly the same, and never print the value of an API key or secret. Reply with: Cause: What you changed, or which Hostinger setting to change: What I should do next:

Fix an AI Feature, Sign-In or Other Feature

The website loads, but a feature does not work.

My project is live on Hostinger and the pages load, but this feature does not work: [DESCRIBE THE FEATURE AND WHAT HAPPENS] Any error message I can see: [PASTE IT HERE, OR DELETE THIS LINE] It works in the Google AI Studio preview. Find why it fails in production. Check the real project files for: - the environment variables this feature reads. List their NAMES so I can confirm each one has a value in Hostinger - code that depends on Google AI Studio's own environment or secrets and has no equivalent on Hostinger - API calls that need a running Node.js server, in case the project was deployed without one - addresses that point to the preview or to localhost instead of the live domain - for sign-in or outside services: settings that must list my live domain Never ask me for the value of an API key or secret, and never print one. Never move a private key into browser code or into a VITE_ variable to make the feature work. Do not invent a cause the files and the error do not support. Keep the design and other features the same. Reply with: Cause: What you changed, or what I must set in Hostinger or in the outside service: What I should do next:

Fix a 404 on an Inner Page

The home page works, but opening or refreshing another page shows a 404.

My project is live on Hostinger. The home page works, but opening or refreshing an inner page shows a 404 page. Inspect how this project handles routes: the router in the frontend, and the server file if there is one. - If the project runs its own Node.js server, make that server return the app's main page for routes the frontend router handles, without breaking API routes or static files. - If the project has no server, do not add one. Tell me what the hosting must do for these routes and which Hostinger setting to check. Change only what this problem needs. Keep the design and features the same. Reply with: Cause: What you changed, or which Hostinger setting to change: What I should do next:

Update Your Website

Every update follows the same path: Google AI Studio → GitHub → Hostinger → Live Website.

Make a small change in Google AI Studio Open Settings, then GitHub Click "Push changes to GitHub" Wait until the project is in sync Wait for Hostinger to deploy the update Refresh your live website and check the change

Hostinger deploys the update by itself as long as your GitHub repository stays connected and automatic deployment is on for your Web App.