Search code examples
reactjsnext.jsfirebase-hosting

Nextjs on firebase hosting returns 404 on page refresh


I've searched the documentation, and I can't seem to figure out why if you refresh the working page on firebase hosting, it'll throw a 404. The site works perfectly unless you try to directly access a page, or if you refresh the page (my guess is there's a disparity between the client browser state and the server state). Any ideas?

The site: rockgodstudios.com


Solution

  • It was cleanUrls. Like a dummy, I had it outside of the hosting JSON. Moving it correctly fixed my issue. Posting for anybody in the future that has this issue.