I'm using Firebase to host a domain with some static html, javascript and images. It works great. The last thing I want to do, is creating a custom 404-error page. According to the Firebase Hosting Documentation (link) I only have to put a file called '404.html' inside the project public directory. It doesn't work. A tree view of my project directory:
- 404.html
- index.html
- images (directory)
- robots.txt
My firebase.json file looks like this:
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "domain.com",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
What am I doing wrong? Thanks.