skip to Main Content

In my firebase URL, when I go to https://example.web.app, it says "Site not found" from Firebase.

But if I would go to https://example.web.app/index.html, the URL would work and it would show the index.html page.

How would I make it so it would point to the default page aka home page, instead of me having to redirect to the index.html page?

firebase.json:

{
  "database": {
    "rules": "database.rules.json"
  },
  "hosting": {
    "public": "dist",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}

dist/index.html exists.
dist directory is used for the public hosting.

index.html works fine when I redirect to https://example.web.app/index.html, but doesn’t work when I go to https://example.web.app, how would I fix that?

The URL is just an "example," to try to explain to you guys. This is not the ACTUAL URL.

2

Answers


  1. Chosen as BEST ANSWER

    The best option is to contact Firebase customer support and ask help from them.


  2. If you check the url https://your-website-name.firebaseapp.com, you will find it to work but not the https://your-website-name.web.app.

    To solve this problem, run the following command line code:
    curl -X PURGE https://your-website-name.web.app.

    I had the same issue and got this help from the Google Support Team.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search