Terms & acceptable use
馃敆 404 and broken link check

Paste your live URL. In about 10 seconds VibeCheck tests the links on your homepage, checks your sitemap and title, and looks for leaked keys in your JavaScript. Free.

FreeJust your email to see results10 seconds

The free scan shows your problems. The $9 fix report gives you a copy鈥憄aste fix prompt for each one.

Guide 路 Launch 路 Updated

Why Does My Lovable or Bolt App Show 404 When I Refresh? Fix "Page Not Found" and Broken Links After Launch

You launched. The home page loads fine. Then someone refreshes the page, or opens a link you shared, and gets "Page not found". This is one of the most common launch problems for apps built with Lovable, Bolt and Replit, and it often shows up right after you move the app to Netlify or Vercel. The fix is usually one small file. Here is why it happens, the fix for each host, how to find other broken links, and how to check your live app.

1. The quick answer

If only the home page works, and every other page 404s when you refresh it or open it directly, your host is missing a fallback rule. Your app needs the host to send index.html for any address that is not a real file. Then your app's router shows the right page.

  • Netlify: add public/_redirects with the line /* /index.html 200.
  • Vercel (Vite app): add vercel.json with a rewrite from /(.*) to /index.html.
  • Next.js app (v0, Cursor): do not add a catch-all. Check that the page file really exists.

Redeploy, then refresh an inner page on your live site to confirm.

2. Why single-page apps 404 on refresh

Most apps from Lovable, Bolt and Replit are built with Vite and React as a single-page app. The build makes one real page, index.html, plus JavaScript files. JavaScript draws every screen in the browser.

When you click a link inside the app, the router changes the address bar to /dashboard, but no new file is loaded. When you refresh, or someone opens /dashboard from a link, the browser asks the host for a file at /dashboard. There is no such file. So the host sends its own 404 page, and your app never even starts.

Lovable's docs say older React + Vite apps need a host "with a fallback to index.html for client-side routes". They also say that if you open a nested route directly and refresh, "a 404 usually means the host is missing the index.html fallback". For newer Lovable apps built on TanStack Start (created from May 13, 2026), a 404 like this usually means the host is not running the server part of the app. That needs a host that runs server code, not a rewrite.

To tell which one you have, open package.json. Lovable says a TanStack Start project lists @tanstack/react-start in its dependencies.

Source: Lovable: Deploying and hosting outside Lovable

3. The fix for Netlify, Vercel, Lovable hosting and Next.js

Netlify (including Bolt apps published to Netlify)

Netlify's docs give this rule for single-page apps. Put it in a file named _redirects (no extension) inside your public folder. Vite copies public into dist when it builds.

/*    /index.html   200

The 200 turns the redirect into a rewrite, so the address bar stays the same. If you have other rules, Netlify says this one is usually listed last. Netlify also does not replace a file that really exists (it calls this "shadowing"), so your JavaScript, images and sitemap.xml still load. Do not add ! after the 200. That forces the rewrite even for real files.

If the home page is also blank or 404, check the publish folder. Netlify needs an index.html in the publish directory, and a Vite app builds to dist.

Vercel (Vite single-page apps)

Vercel says that if a Vite app is deployed as a single-page app, "deep linking won't work out of the box." Add vercel.json at the root of your project:

{
  "rewrites": [
    { "source": "/(.*)", "destination": "/index.html" }
  ]
}

If cleanUrls is set to true in the same file, Vercel says to leave off the file extension, so the destination becomes /index. Commit the file and redeploy.

Lovable hosting

Lovable's docs tell you to test a new host against the copy of your app running on Lovable, refreshing a nested route on both. So a refresh 404 usually starts when you move to another host. If one page 404s on your lovable.app address too, the route is most likely missing or misspelled. Ask Lovable in chat to list your routes and compare them to your links.

Next.js apps (v0, Cursor)

Next.js has its own routing, so it does not need this catch-all. Vercel says the catch-all rewrite is for single-page apps built with tools like Vite, not for frameworks with their own routing, and that with Next.js, rewrites belong in next.config.js, not vercel.json. A 404 in a Next.js app usually means the page file is missing, misnamed or in the wrong folder.

Other hosts

Lovable lists the place to add the fallback for other hosts: a _redirects file on Cloudflare Pages, staticwebapp.config.json on Azure, rewrite rules on Amplify, and firebase.json on Firebase. On your own Nginx server, Lovable's example uses try_files $uri $uri/ /index.html;. For S3 and other storage hosting, Lovable warns not to rely on the storage error page setting, because it returns a 404 status code.

Sources: Netlify: Rewrites and single-page apps 路 Netlify: Page not found error guide 路 Netlify: Deploy your Bolt app 路 Vercel: Vite on Vercel 路 Vercel: Why is my deployed project giving a 404? 路 Lovable: Deploying outside Lovable

4. Other reasons you see 404 after launch

What you seeLikely causeWhat to do
404 only when you refresh or open a shared linkThe host has no SPA fallback to index.html.Add the rewrite for your host (section 3).
Home page is also 404 or blankWrong publish folder, or index.html is missing from the deploy.Vite builds to dist. Point the host at dist.
One link 404s even inside the appThe page was renamed or removed, or the link has a typo.Fix the link or add the missing page.
Sign-in sends people to a 404 or an errorThe new URL is not in your auth provider's allowed redirect URLs, or the callback route has no fallback.Add the URL in your auth settings and add the rewrite.
Server pages or API calls break after the rewriteThe app has a server part (Next.js, TanStack Start) and the catch-all swallowed it.Remove the catch-all. Let the framework route.

Footer links break a lot. AI builders often add Privacy, Terms or Blog links to pages that were never made. Check them before you share your app.

Sign-in is the other big one. Lovable says that when you move hosts, a redirect error after signing in "usually means the new URL is missing from your authentication provider's allowed redirect URLs." Add your new domain there.

Source: Lovable: Verify before switching traffic

5. Do not hide real missing pages (soft 404s)

The catch-all rewrite has one side effect. Every address now returns status 200, even pages that do not exist. Your app shows its own "not found" screen, but the server says everything is fine.

Google says that if a page returns 200 but looks like an error or an empty page, Search Console reports it as a soft 404. Google does not index URLs that return a 4xx code. For single-page apps, Google suggests one of two fixes on your not-found screen:

  • Send the visitor with JavaScript to a URL that the server really answers with 404 (for example /not-found), or
  • Add <meta name="robots" content="noindex"> to the error screen with JavaScript.

Google also says it can only find your links if they are real <a> tags with an href, and to use normal paths instead of #/ style links. If Google shows the wrong title for your pages, see why your app shows the wrong title in Google. If Search Console rejects your sitemap, see how to fix "Sitemap is HTML".

Sources: Google: How HTTP status codes affect Google's crawlers 路 Google: JavaScript SEO basics

6. Check your live app in 60 seconds

  1. Refresh a deep page. Open your live app, click into any page other than the home page, then press refresh. You should see the same page.
  2. Open a shared link fresh. Copy an inner page address, open a private window, paste it and press Enter. This is exactly what someone clicking your link on 饾晱 or in an email sees.
  3. Check the status code. In a terminal, run this. You want 200, not 404:
    curl -sI https://your-domain/dashboard
  4. Try a page that does not exist. Open https://your-domain/this-page-does-not-exist. You should see a friendly not-found screen with a link home, not a blank page.
  5. Click every footer link. Privacy, Terms, Contact, Blog. These are the ones that break most.
  6. Sign in and sign out on the live domain, not just in the preview.

7. Copy-paste fix prompts

Paste the prompt that matches your host into Lovable, Bolt, v0, Replit or Cursor. Redeploy, then run the 60-second check again.

Netlify (Lovable, Bolt, Vite apps): fix 404 on refresh
My app is a Vite + React single-page app hosted on Netlify. The home page works, but refreshing any other page or opening a shared link shows Netlify's "Page not found". Add a file at public/_redirects (no file extension) with exactly this line: "/*  /index.html  200". If I already have other rules in _redirects or netlify.toml, keep them and put this catch-all last. Do not use "200!" (forced), because that would also rewrite my JavaScript and CSS files. Do not change my routes. Tell me how to test it after I redeploy.
Vercel (Vite single-page app): fix 404 on refresh
My app is a Vite + React single-page app on Vercel. Refreshing any page except the home page gives a 404. Create vercel.json at the project root (next to package.json, not inside src or dist) with a rewrites rule: source "/(.*)", destination "/index.html". If cleanUrls is true in vercel.json, use "/index" as the destination instead. If my app has an /api folder of serverless functions, exclude /api from the rewrite. This is NOT a Next.js app; if it is, stop and tell me instead of adding the rewrite.
Any app: find and fix broken links and add a real not-found page
Go through every link and button in my app, including the header, footer, Privacy and Terms links. List every link that points to a page or route that does not exist, plus any placeholder links like "#" or example.com. Fix each one by pointing it to a real page or creating the missing page. Then add a catch-all "not found" route that shows a friendly message with a link back home, and add <meta name="robots" content="noindex"> to that not-found screen so Google does not index it.

8. What VibeCheck checks for you

Paste your link into VibeCheck. It loads your live site from the outside, the way a stranger or a search engine would. For launch problems, it checks:

  • Broken links on your homepage: it reads the links in your homepage HTML, tests up to 20 that point to your own site, and lists any that return an error or time out.
  • Search basics: a missing or starter title, a missing description, a noindex tag or header, a missing or HTML sitemap.xml, and a robots.txt that blocks everything.

In the same scan it also looks for the bigger risks: leaked API keys in the JavaScript your homepage loads, Supabase tables your public key can read, and missing security headers.

What it does not do: it does not click through every page, log in, or refresh each route for you. Many single-page apps add their links with JavaScript, so the first HTML has no links to test. When that happens, the scan tells you the link check was limited. Use the 60-second check above for refresh 404s. It never asks for your code or login.

Pricing: the problems list is free (just add your email). The $9 fix report gives you a copy-paste fix prompt for every problem found, or get the $29 10-pack. No subscription.

9. FAQ

Why does my app show 404 when I refresh the page?

Because your app is a single-page app. There is only one real file, index.html, and JavaScript draws every page in the browser. When you click a link inside the app, no new file is loaded. When you refresh /dashboard or open it from a shared link, the browser asks the host for a file called /dashboard. The host has no such file, so it sends a 404. The fix is a rewrite rule that sends index.html for every path.

Why does it work in the Lovable or Bolt preview but not on my own host?

The preview already knows your routes. Lovable's docs say older React + Vite apps need a host with a fallback to index.html for client-side routes, and that a 404 on a refreshed nested route usually means that fallback is missing. When you move the app to Netlify, Vercel or another host, you have to add it yourself.

What is the fix on Netlify?

Add a file called _redirects (no file extension) to the public folder with this one line: /* /index.html 200. Vite copies it into dist when you build. Netlify says the 200 makes it a rewrite, so the address bar stays the same, and real files like your JavaScript still load because Netlify does not replace files that exist.

What is the fix on Vercel?

For a Vite single-page app, Vercel says deep linking will not work out of the box. Add a vercel.json file at the root of your project with a rewrite from "/(.*)" to "/index.html", then redeploy. Do not add this to a Next.js app (common with v0 and Cursor). Next.js already handles its own routes.

Can this rewrite hurt my Google ranking?

It can hide real missing pages. With a catch-all rewrite, a page that does not exist still returns status 200 and your app shows its own "not found" screen. Google calls this a soft 404. Google suggests either redirecting to a URL that really returns 404, or adding a noindex robots tag to your error screen.

Does VibeCheck find broken links?

Yes, on your homepage. VibeCheck reads the links in your live homepage HTML, tests up to 20 links that point to your own site, and lists any that return an error (status 400 or higher) or time out. Many single-page apps have no links in the first HTML because JavaScript adds them later. In that case the check is limited, and the scan says so. It does not click through every page or test your refresh behavior on each route.

More questions? See the VibeCheck FAQ. Related guides: Sitemap is HTML or couldn't fetch? 路 Wrong title in Google? 路 Is my Lovable app safe? 路 Is my Bolt app secure? 路 Is my v0 app secure? 路 Vibe coding security checklist.