# Firebase Hosting: “Page Not Found” after deploy or on refresh

> Firebase Hosting shows Page Not Found after firebase deploy, or on refresh. Point public at your build folder and add a rewrite to index.html for your app.

Canonical: https://app369.com/fix/firebase-hosting-page-not-found/
Last updated: 2026-11-09

Firebase Hosting shows its own Page Not Found screen when the folder you deployed has no file for the URL and no 404.html. The two usual causes are a public setting in firebase.json that points at the wrong folder, and a single-page app with no rewrite to index.html.

**Short answer**

Set "public" in firebase.json to the folder your build writes, such as dist or build/web, run the build, then deploy again. If the home page works but other routes fail on refresh, add a rewrite of "**" to "/index.html". If the screen says Site Not Found instead, the site or custom domain usually has no live deploy yet, or the domain isn’t connected.

Rather not fix it yourself? [**App Fix Ticket**](https://app369.com/fixed-price/flutter-firebase-bug-fix/) starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.

## **Why the page is not found, and the fix**

1. 01 ### **public points at the wrong folder**
  > “The public attribute specifies which directory to deploy to Firebase Hosting.” [**Firebase, Configure Hosting behavior**](https://firebase.google.com/docs/hosting/full-config) firebase init sets public to a folder called public, but most build tools write elsewhere: dist for Vite, dist/<project> for Angular, build for Create React App, out for a Next.js static export, build/web for Flutter. Firebase deploys whatever that folder holds. If you left the default public folder, you may see Firebase’s welcome page instead of your app. If the folder is missing, the deploy fails with a public directory error. A folder without index.html gives Page Not Found.```
{
  "hosting": {
    "public": "dist",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
  }
}
```
2. 02 ### **The build didn’t run before deploy** firebase deploy uploads the folder as it is. Run the build first, check that index.html is in the folder, then deploy. In CI, run both steps in the same job.```
npm run build && ls dist/index.html && firebase deploy --only hosting
```
3. 03 ### **Routes work by clicking but not on refresh**
  > “You can also use rewrites to support apps that use HTML5 pushState for navigation.” [**Firebase, Configure Hosting behavior**](https://firebase.google.com/docs/hosting/full-config) React Router, Vue Router and Flutter web handle routes in the browser. A refresh asks Hosting for a file like /dashboard, which doesn’t exist. Add a rewrite that serves index.html for every path without a file.```
"rewrites": [
  { "source": "**", "destination": "/index.html" }
]
```
4. 04 ### **Another rule matches first**
  > “Within each of the redirects and rewrites attributes, Hosting applies the redirect or rewrite defined by the first rule with a URL pattern that matches the requested path.” [**Firebase, Configure Hosting behavior**](https://firebase.google.com/docs/hosting/full-config) Rules run top to bottom, and the first match wins. A broad rewrite above a function or API rewrite sends those requests to the wrong place. Put the specific rules first and the "**" rewrite last.

Checked against the vendor’s docs on November 9, 2026: [Firebase docs: Configure Hosting behavior](https://firebase.google.com/docs/hosting/full-config).

## **Rather hand it over?**

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

- [from $450**App Fix Ticket**One reproducible bug in an existing mobile or web app, diagnosed and fixed.**See scope and start**](https://app369.com/fixed-price/flutter-firebase-bug-fix/)
- [from $450**AI-Built App Rescue**A Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.****No issues worth fixing, no charge.**** If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.**See scope and start**](https://app369.com/fixed-price/ai-app-rescue/)

[**All 127 Fiverr reviews**](https://app369.com/reviews/)

Related: [**“Page Not Found” on refresh on Netlify or Vercel**](https://app369.com/fix/page-not-found-on-refresh-netlify-vercel/) · [**Firebase Cloud Functions CORS error**](https://app369.com/fix/firebase-functions-cors-error/) · [**Firebase Storage unauthorized**](https://app369.com/fix/firebase-storage-unauthorized/) · [**Firebase Storage object-not-found**](https://app369.com/fix/firebase-storage-object-not-found/)

Questions

## **More on this error**

<details>

<summary>**Can I show my own 404 page? **+</summary>

Yes. Put a 404.html at the root of the deployed folder and Hosting shows it for missing pages. A single-page app with the "**" rewrite rarely reaches it, so handle unknown routes in the app too.

</details>

<details>

<summary>**What does Site Not Found mean? **+</summary>

It is a different screen. It usually means the site or custom domain has no live deploy yet, or the domain isn’t connected. Check firebase use and the site name in firebase.json, then deploy again.

</details>

<details>

<summary>**Can you fix it for me? **+</summary>

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

</details>

A different error?

## **Describe it and get a written quote**

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.

[**Describe your problem **→](https://app369.com/contact/) [**All fixes**](https://app369.com/fix/)