Replit guides

Take your Replit app from prototype to production

Practical guides to shipping Replit Agent apps: what breaks after you publish, and how to fix it step by step, with a copy-paste prompt for Agent in every fix.

Deployment

Deployment

How to deploy a Replit app to production, step by step

A launch runbook for Replit apps: pick the deployment type, set production secrets, prepare the database, connect a custom domain and add monitoring.

Read the guide →
Deployment

Replit Autoscale vs Reserved VM vs Static vs Scheduled: which deployment should you choose?

Autoscale, Reserved VM, Static or Scheduled? How each Replit deployment type works, cold starts, background jobs and costs, plus a 30-second decision tree.

Read the guide →
Deployment

Replit deployment failed: fix the port and 0.0.0.0 errors

Publishing fails at the promote step, or the live app says it failed to respond? Fix the host, PORT and .replit port settings that break Replit deployments.

Read the guide →
Deployment

Replit app works in preview but not after deploy

Your Replit Agent app works in the preview but breaks once published: missing data, failed API calls, login or payments. The checklist that finds the cause.

Read the guide →
Deployment

Replit secrets not working in deployment? How to fix it

Your API key works in the workspace but is undefined in the published Replit app. Check deployment secrets, sync, republishing and frontend build variables.

Read the guide →
Deployment

Replit custom domain or SSL not working? Fix the DNS

Custom domain stuck on Verifying, SSL errors, or "deployment could not be reached" on Replit? Fix the A and TXT records, Cloudflare proxy, AAAA and CAA issues.

Read the guide →
Deployment

Replit app shows 404 on page refresh? Fix SPA routing

Your React app on Replit works from the homepage, but deep links and refresh return 404. Add the right fallback route or rewrite without breaking APIs.

Read the guide →
Deployment

Replit deployment build failed: how to read the logs and fix it

Replit publish fails during the build, gets stuck, or says the image exceeds 8 GiB? Read the build log, find the first error and fix the usual causes.

Read the guide →
Deployment

Replit Autoscale cold starts: why the first load is slow

Your Replit app takes seconds to load after a quiet period? That is an Autoscale cold start. Shorten startup, or choose Reserved VM when it really matters.

Read the guide →
Deployment

Replit cron jobs not running in production? Here is why

Your setInterval or node-cron job works in the preview but not on Replit Autoscale. Move it to a Scheduled deployment or a protected endpoint on a schedule.

Read the guide →
Deployment

Replit changes not showing after deploy? 5 reasons and fixes

You published, but the live Replit app still shows the old version. Republish, fix index.html caching and service workers, and check the data source.

Read the guide →

Troubleshooting

Troubleshooting

Replit Agent keeps breaking your app? How to stop the fix loop

Why Replit Agent fixes one bug and breaks another, how to roll back safely with checkpoints, and a prompting workflow that stops the loop.

Read the guide →
Payments

Stripe webhook not working on Replit? How to fix it

Payments succeed but your Replit app never updates? Fix the webhook URL, signing secret, raw body, test vs live mode and middleware that block Stripe.

Read the guide →
Auth

Google sign-in fails on Replit with redirect_uri_mismatch: fix it

Google login works in the preview but fails on your published Replit app with Error 400 redirect_uri_mismatch. Register the right URLs and fix the callback.

Read the guide →
Auth

Login not working after deploy on Replit? Fix sessions and cookies

Users log in on your Replit app, then get logged out on the next click or loop back to login. Fix trust proxy, secure cookies, session secret and store.

Read the guide →
Troubleshooting

CORS error on your Replit deployment? How to fix it

Blocked by CORS policy after publishing on Replit? Use relative API URLs, allow only your real origins, handle credentials, and spot crashes posing as CORS.

Read the guide →
Troubleshooting

Replit 502 Bad Gateway or 500 error after publishing: how to fix it

Your published Replit app returns 502 Bad Gateway, a 500 error or Application failed to respond. Find the crash in the logs, fix it, or roll back fast.

Read the guide →
Troubleshooting

Vite environment variables undefined on Replit? Here is why

import.meta.env values are undefined in your Replit React app, or process is not defined in the browser. Fix the VITE_ prefix and build-time values safely.

Read the guide →
SEO

Replit app not indexed by Google? How to fix it

Google ignores your Replit app, robots.txt or sitemap.xml returns HTML, or every page has the same title. Fix the technical SEO basics of a Replit Agent app.

Read the guide →
Replit Agent

How to roll back Replit Agent changes (and what happens to your data)

Agent broke your app? How Replit checkpoints and rollbacks work, why the database is not restored by default, and how to update the live app afterwards.

Read the guide →
Book the $199 review