---
title: "Page shows 404 when I refresh or share a link"
description: "A 404 on refresh means your single page app has no rewrite rule on Netlify or Vercel. How to check the host and fix it with one small config file."
url: https://whocanfixmyapp.com/problems/404-when-i-refresh-or-share-a-link
---

[Home](https://whocanfixmyapp.com/) / [Problems](https://whocanfixmyapp.com/problems) / [Deploy and go live](https://whocanfixmyapp.com/problems#deploy-and-go-live)

# Page shows 404 when I refresh or share a link

VC-18 · Netlify · Vercel · Bolt · Updated October 2026 · By [Nathaniel Kelley](https://whocanfixmyapp.com/authors/nathaniel-kelley)

Quick verdict

Partly fixable yourself. One config file, then redeploy.

- **How serious**: Medium
- **Fix it yourself?**: Partly, some steps need a developer
- **Typical cost**: €99–$990 for a single fix ([prices](https://whocanfixmyapp.com/pricing))
- **Top rated for Bolt**: [Afterbuild Labs](https://whocanfixmyapp.com/companies/afterbuild-labs) · **10.0**/10

**What you see.** Clicking around works, but refreshing a page or opening a shared link shows Page not found or 404.

## Why it happens

Apps built with Bolt, Lovable and many Vite templates are single page apps. There is one real file, `index.html`, and the JavaScript inside it swaps screens as you click. The address bar changes to `/dashboard`, but no file called dashboard exists on the server. When you refresh or share that address, the host looks for the file, finds nothing, and returns 404.

Hosts need a rule that says serve `index.html` for every path and let the app handle routing. Netlify reads it from a `_redirects` file or `netlify.toml`. Vercel reads a rewrite from `vercel.json`, and warns that a wrong Framework Preset or an uncommitted config file also causes every page to 404. Next.js apps from v0 do not have this problem, because each route is a real page.

## Fix it yourself

1. Confirm the type of app. If the project has a `vite.config` file and no `app` or `pages` folder, it is a single page app and needs a rewrite rule.
2. Netlify: create a file named `_redirects` in the publish directory, usually via the `public` folder so it is copied into `dist`, containing one line: `/* /index.html 200`.
3. Vercel: add `vercel.json` at the repository root with a rewrites entry sending `/(.*)` to `/index.html`. Commit it, since Vercel ignores files that are not in Git.
4. If your app also has an `api` folder, exclude it from the rewrite as Vercel's guide shows, or API calls will return the HTML page.
5. In Vercel, check **Settings → Framework Preset** is Vite, not Other. Redeploy and test a deep link in a private window.
6. Bolt publishes to its own host or Netlify. Ask Bolt to add the Netlify redirect file, then publish again.

## When to get an engineer

Hire when the 404 persists after the rule, when the app mixes server routes and client routes, or when the host is a VPS or Docker setup without these conventions. Send the engineer the repo, the host name and one failing URL. This is a quick single fix at the low end of €99–$990, often under a day. See [the launch checklist](https://whocanfixmyapp.com/checklist) for other go-live items.

## Top-rated companies for Bolt apps

Ranked by our score: published prices, scope of work, AI tools named, timing and a low-risk first step. [How we score](https://whocanfixmyapp.com/methodology#score).

- 1 · [Afterbuild Labs](https://whocanfixmyapp.com/companies/afterbuild-labs) · **10.0**/10 · Best for: A check before launch · Free first step · from $49
- 2 · [Redlab](https://whocanfixmyapp.com/companies/redlab) · **10.0**/10 · Best for: A full rescue by one team that keeps building · Free first step · from $490
- 3 · [Vibe Code Rescue (Lev Arakelyan)](https://whocanfixmyapp.com/companies/vibe-code-rescue-lev-arakelyan) · **9.0**/10 · Best for: A one-off check and a cleanup · From $299

[All 48 Bolt companies, ranked](https://whocanfixmyapp.com/best/bolt-developers)

## Check these

COST-03 · Medium

Key pages load fast on a phone

Run PageSpeed Insights on the home page and the main app screen, on mobile.

OPS-03 · High

Errors reach you before users do

Add error monitoring and uptime alerts. If you learn about outages from customers, this is missing.

CODE-01 · High

The code lives in a Git repository you own

Connect GitHub or export the project. If the builder account is lost, the product should not be.

## Questions

### Why does it work when I click but not when I refresh?

Clicking is handled by JavaScript already loaded in the page. Refreshing asks the server for that path directly, and without a rewrite rule the server has no such file.

### Will the rule break my API or images?

A catch-all rewrite can swallow API paths. Vercel's guide shows how to exclude api/ from the rule. On Netlify, a rewrite without the force option does not override files that exist.

Sources: [Netlify: Page not found error guide](https://docs.netlify.com/resources/troubleshooting/page-not-found-error-guide/); [Netlify: Redirects and rewrites](https://docs.netlify.com/manage/routing/redirects/overview/); [Vercel: Why is my deployed project giving a 404](https://vercel.com/kb/guide/why-is-my-deployed-project-giving-404).

**Bolt guide**

What Bolt builds, where it breaks and how to check it: [Bolt app rescue: moving a Bolt.new project to production](https://whocanfixmyapp.com/guides/bolt).

**Same category**

- [Lovable app not working: what breaks between preview and production](https://whocanfixmyapp.com/problems/lovable-app-not-working)
- [Base44 app not loading or stuck on Thinking: what it usually means](https://whocanfixmyapp.com/problems/base44-app-not-loading)
- [v0 app needs a backend and deployment: what to add before real users](https://whocanfixmyapp.com/problems/v0-app-needs-a-backend)
- [Claude Code or Cursor app works on localhost, breaks in production](https://whocanfixmyapp.com/problems/claude-code-works-on-localhost-breaks-in-production)
- [Lovable publish fails with a build error](https://whocanfixmyapp.com/problems/lovable-publish-failed-build-error)
- [Lovable custom domain stuck on Verifying or Setting up](https://whocanfixmyapp.com/problems/lovable-custom-domain-stuck-verifying)

[All deploy and go live problems](https://whocanfixmyapp.com/problems#deploy-and-go-live)

**Run every check**

The [production checklist](https://whocanfixmyapp.com/checklist) has all 24 checks with a verdict.
