Updated 11 min readBy The VibeDeploy team

Lovable Production Checklist: Keys, SEO, 404s and Forms

Before a Lovable app goes public on your own host: which Supabase key ships, what crawlers see, how 404s behave, where forms go and how to undo a release.

Short answer

Before a Lovable build goes public on its own host, make sure of seven things: no secret key in the bundle, Row Level Security on every table, meta tags and a sitemap that crawlers can read without Lovable's pre-rendering, the right 404 behaviour for a single-page app, a tested form destination, analytics from the first visit, and a rehearsed way back to the previous files and data. Then do one last pass on the live domain.

Ship the checked build

Connect the repository Lovable syncs to, or upload your dist/ folder. A restore point before every deploy, built-in analytics and a forms relay come with it. 14 days free, no card.

Your Lovable app works on its lovable.app address, and the move to your own domain is mostly DNS (the guide to a custom domain on Lovable's Free plan covers that part). What the move also does is take away a few things Lovable handled quietly: the security scan that runs when you publish there, the pre-rendered pages it serves to crawlers, and its traffic numbers. This checklist is about replacing them before you send the link to customers.

It is written for an older React + Vite project served as static files. Where a TanStack Start project, Lovable's default for new projects since May 2026, behaves differently, the item says so.

1. Keep secrets out of the bundle

Assume everything in dist/ is public, because it is: every visitor's browser downloads it. Vite only exposes variables whose names start with VITE_ to your code, and its documentation warns that they should not contain sensitive information such as API keys, since their values are written into the bundle at build time.

Lovable splits values the same way. The Supabase URL and publishable key are VITE_ values in the .env file and are meant to be public. Keys for Stripe, Resend, an AI provider or anything else private belong in Lovable Cloud's Secrets (or the Edge Function secrets of your own Supabase project), where only Edge Functions read them and the browser never sees them.

If part of your app runs as a server on VibeDeploy (a TanStack Start server or an API in a container), its keys go into the site's Settings > Secrets in the VibeDeploy dashboard. Every container service receives them as environment variables. They do not belong in the repository, in the app config or in a chat with your AI.

2. Check which Supabase key ships, and lock the tables

Supabase has two kinds of keys. The publishable key (sb_publishable_..., or the legacy anon key, a long JWT that starts with eyJ) is made for browsers and only reaches what Row Level Security allows. The secret key (sb_secret_..., or the legacy service_role JWT) bypasses Row Level Security, and Supabase's rule is that it never goes into a browser, a shipped app or source control. Make sure the second kind did not end up in frontend code.

Build the project, then scan the output. Save this as check-keys.mjs next to package.json and run node check-keys.mjs:

import { readdirSync, readFileSync, statSync } from "node:fs";
import { join } from "node:path";
 
const files = (dir) =>
  readdirSync(dir).flatMap((name) => {
    const path = join(dir, name);
    return statSync(path).isDirectory() ? files(path) : [path];
  });
 
for (const file of files("dist")) {
  const text = readFileSync(file, "utf8");
  if (text.includes("sb_secret_")) console.log(`${file}: SECRET KEY`);
  for (const [, payload] of text.matchAll(/eyJ[\w-]+\.(eyJ[\w-]+)\.[\w-]+/g)) {
    try {
      const { role } = JSON.parse(Buffer.from(payload, "base64url").toString());
      console.log(`${file}: JWT with role ${role}`);
    } catch {}
  }
}

A JWT with role anon is what you want to see, and a project on the new key format prints nothing at all. A secret key or the role service_role means the key is exposed: create a new secret key in the Supabase dashboard, switch your server code to it and then retire the old one, which is the rotation Supabase documents. Supabase is also deprecating the legacy anon and service_role keys by the end of 2026, so expect to move to the new key types.

The publishable key is only as safe as your policies. Supabase asks you to enable Row Level Security on every table before you deploy, with policies written for the anon and authenticated roles. Lovable's Quick scan checks for tables without it, but that scan runs when you publish on Lovable, not when a build from GitHub ships to another host. Run the scans yourself from the project's Security view in Lovable before launch.

On Lovable's hosting, an older React + Vite app is pre-rendered on request for verified crawlers: Google, Bing, social preview bots and AI engines receive finished HTML, while people get the single-page app. That service stays with Lovable. VibeDeploy has no pre-rendering step, so on your own host every visitor and every bot receives the same index.html plus the JavaScript that builds the page.

Google can render JavaScript, but it queues pages for rendering first, and its own guidance adds that not all bots can run JavaScript. Social platforms such as LinkedIn, Slack and WhatsApp usually read the Open Graph tags straight from the HTML without running scripts, so tags that React sets per page mostly never reach them.

What to do before launch:

  • Write a real title, description and canonical URL on your domain, plus og:title, og:description and og:image, into index.html. Every route shares them, so write them for the page you share most. If you keep the lovable.app copy online, publish it once more with that canonical tag, so search engines know which address is the real one.
  • Add robots.txt and a sitemap.xml with your domain's URLs to the public/ folder. Vite copies that folder to the root of dist/ unchanged.
  • Verify the domain in Google Search Console and submit the sitemap there.
  • If search traffic is the point of the site, give the pages that must rank a static version: a plain HTML landing page on the main domain with the app on a subdomain such as app.example.com (two sites, which on VibeDeploy starts at the Maker plan), or Lovable's upgrade to TanStack Start, which renders every page on the server but then needs a host that runs that server. If VibeDeploy builds your repository on every push, let Lovable do that upgrade on a separate branch and merge it only when the server runs.

Ship the checked build

Connect the repository Lovable syncs to, or upload your dist/ folder. A restore point before every deploy, built-in analytics and a forms relay come with it. 14 days free, no card.

4. Get 404s right for a single-page app

VibeDeploy decides with one file. When the build has a 404.html at its top level, unknown paths get that page with a real 404 status. When it has none, unknown paths are answered with index.html, the fallback a single-page app depends on.

A React + Vite Lovable app routes pages in the browser, so it needs that fallback. With a top-level 404.html, a visitor who opens or refreshes /pricing would get your error page instead of the pricing page. Check that dist/ has no 404.html, and let the app's catch-all route show the not-found screen.

The price of the fallback is that an unknown URL answers with status 200, which Google may report as a soft 404. Google's advice for client-side routing offers two fixes: add a robots noindex meta tag to the not-found screen from JavaScript, or redirect with JavaScript to a URL that does return a 404 status. The first is a small change you can ask Lovable to make. TanStack Start apps route on the server, so this item does not apply to them.

5. Give every form a destination you have tested

A form in a Lovable app is a React component. It only does something if its submit handler sends the data somewhere, and on a static host there is no server of yours waiting for it. Two setups work:

  • Your Supabase backend. A form that inserts into a Supabase table keeps working after the move, because the browser talks to Supabase directly. Give that table a policy that lets visitors insert rows and nothing else (item 2).
  • VibeDeploy's forms relay. For a contact form, ask your AI assistant, connected to VibeDeploy over MCP, to turn on the relay with set_forms_config, then ask Lovable to make the form POST JSON to the endpoint the tool returns, so the change lives in the repository and survives the next build. Submissions reach your mailbox as email, with no form service in between.

Then submit the form from the live domain, not from the Lovable preview, and confirm the message arrived.

6. Measure from the first visit

Lovable's project analytics are tied to publishing on Lovable: they collect data while the project is published there, so do not count on them for the copy on your domain. On VibeDeploy, privacy-friendly analytics are built in and show in the site's dashboard. If you also use an analytics tool of your own, add its snippet to index.html before launch, because launch-day traffic is the traffic you cannot measure afterwards.

7. Know your way back: files, code and data

A bad release can break three things, and each has its own undo:

  • The deployed files. VibeDeploy keeps every deploy as a version and takes a restore point before each one, and you can create one on demand. An earlier version comes back with one click in the dashboard (History tab) within your plan's restore window: 3 days on the trial, Solo and Maker, 7 on Studio and 30 on Business. The restore points live on the replicated storage cluster in Belgium, not off-site.
  • The code. Lovable's version history reverts the project, and the GitHub repository keeps every commit. Lovable notes that very old versions can still be previewed but no longer restored.
  • The data. Neither of the above touches your database. Lovable Cloud keeps one database backup per day for roughly 14 days, which you restore under More > Cloud > Database > Backups; files in storage are not part of it. On a Supabase project of your own, the Pro plan keeps 7 days of backups, and Supabase recommends that free projects export regularly with the CLI's db dump command and keep copies elsewhere.

Files and data are restored separately, and Lovable warns that a database restore also reverts the schema, so a site version and a database backup from different days may not fit together. Rehearse the file restore once before launch, while nothing depends on it. On Studio and Business, a staging environment lets you click through a release before it reaches your visitors, and from Maker up a password-protected or invite-only site gives a client a private preview.

Open your domain in a private browser window and:

  • open a deep link such as /pricing directly, then refresh it;
  • sign up, sign in and sign out (a redirect error usually means the domain is missing from the auth redirect URLs);
  • create, read and upload whatever the app stores;
  • send the form once more;
  • paste the address into a link preview debugger or a chat with a colleague and look at the card;
  • run Lovable's security scan again if the code changed since item 2.

When one of these fails, item 7 is your way back. DNS records, Cloudflare and certificate problems are covered in the custom domain guide, and the Lovable deploy guide sums up the hosting side.

Sources

  • Vite, Env variables and modes and Static asset handling: which variables reach client code and the warning about secrets; the public/ folder copied to the root of dist/. Checked 13 October 2026.
  • Lovable Docs, Secrets: backend secrets versus VITE_ values in .env. Checked 13 October 2026.
  • Supabase Docs, API keys: publishable and secret keys, the legacy anon and service_role keys and their deprecation by the end of 2026, Row Level Security, rotating a leaked key. Checked 13 October 2026.
  • Lovable Docs, Security overview: the Quick scan at publish time and its check for tables without row-level security, the Deep scan. Checked 13 October 2026.
  • Lovable Docs, Optimize your app for SEO and AI search and How Lovable hosts your app: on-request pre-rendering for verified crawlers, social platforms reading Open Graph tags without JavaScript, TanStack Start for new projects. Checked 13 October 2026.
  • Google Search Central, Understand JavaScript SEO basics: the rendering queue, bots that cannot run JavaScript, soft 404 fixes for client-side routing. Checked 13 October 2026.
  • Lovable Docs, Project analytics: analytics collect data while the project is published on Lovable. Checked 13 October 2026.
  • Lovable Docs, Revert and restore your project with version history and Database: reverting code only, very old versions, one backup per day kept for about 14 days, storage files excluded, schema reverted on restore. Checked 13 October 2026.
  • Supabase Docs, Database backups: backup retention per plan and the export advice for free projects. Checked 13 October 2026.
  • Lovable Docs, Deploying and hosting outside Lovable: the checks to run before switching traffic, the server handling routing for TanStack Start apps. Checked 13 October 2026.
  • Lovable Docs, Sync your Lovable project code with GitHub, GitLab, or Bitbucket: edits made in Lovable are committed and pushed to the synced branch, and Lovable can switch to or create another branch. Checked 13 October 2026.
From the VibeDeploy team

Ship your AI-built site in minutes

VibeDeploy hosts your AI-built websites in the EU with custom domains, automatic SSL, and a 14-day free trial that gets you online today.

Deploy guides for this topic

Questions people ask

Is the Supabase key in my Lovable app's JavaScript a leak?

Not if it is the publishable key or the legacy anon key: Supabase designs those to be public and lets Row Level Security decide what they can reach. It is a leak when the bundle holds a secret key (sb_secret_...) or a service_role key, because both bypass Row Level Security. Rotate such a key right away.

Why does a shared link to my exported Lovable app show a generic preview?

Social platforms read Open Graph tags from the HTML they download and usually do not run JavaScript. Lovable's hosting serves pre-rendered pages to social preview bots; a static host serves index.html as it is. Put the title, description and image tags in index.html, and they apply to every link you share.

Should I add a 404.html to my Lovable app?

Not to a React + Vite single-page app on VibeDeploy. A top-level 404.html replaces the index.html fallback, so a deep link such as /pricing would show the error page instead of your pricing page. Keep the fallback and let the app's not-found screen carry a robots noindex tag.

Related reading