DEV Community

Cover image for Resolving the Vercel 404 "Page Not Found" Error After Page Refresh.

Resolving the Vercel 404 "Page Not Found" Error After Page Refresh.

Stanlisberg on September 18, 2023

I recently completed a project(cinemaxtv.vercel.app), which is a movie application. After deploying the application on Vercel, I noticed an unusual...
Collapse
 
hassanabuya82 profile image
Hassan •

I don't know why my error still persists

Collapse
 
stanlisberg profile image
Stanlisberg •

What error are you getting?

Collapse
 
kingjulien profile image
Abusomwan Santos •

my links arent working, like when i try to navigate to /about. only the navbar works

Thread Thread
 
stanlisberg profile image
Stanlisberg • • Edited

I meant, what is the content of the error message? Kindly send a screenshot of the error and your routing set up to help assist you better.

Thread Thread
 
kingjulien profile image
Abusomwan Santos •

Its strange cause it works well in dev mode, i can navigate between links but it fails on prod mode
Image description

Thread Thread
 
kingjulien profile image
Abusomwan Santos •

Image description

Collapse
 
dbkooper51 profile image
CodeKooper •

Thanks for this.
For flutter apps or Single page apps, the following helped me :

{
  "rewrites": [
    {"source": "/:a*", "destination": "/"}
  ]
}

Enter fullscreen mode Exit fullscreen mode
Collapse
 
ebubeevan profile image
Evangeline Mmayie • • Edited

Thanks a lot! was wondering why the child paths of my deployed app couldn't refresh. God bless

Collapse
 
stanlisberg profile image
Stanlisberg •

You are welcome @ebubeevan. I am glad to help.🤗

Collapse
 
aasim782 profile image
Aasim •

Thank you!, I faced same problem. I fixed now

Collapse
 
stanlisberg profile image
Stanlisberg •

I am glad I could help @aasim782 🙏

Collapse
 
israelmitolu profile image
IsraelMitolu •

Thank you!
It worked well

Collapse
 
cpwaldow profile image
Carlos Eduardo •

Dude, thank you, i got this problem right now and the vercel.json solution worked to me.

Collapse
 
ngermanishvili profile image
Nika Germanishvili •

Thank you!! its worked !

Collapse
 
caleb__kwizera profile image
Caleb Kwizera •

It worked for me

Collapse
 
viniciusbarth2 profile image
vinicius barth •

this resolved the problem, thanks bro 😀

Collapse
 
arifpetok profile image
Arif Wijianto •

works for me, thanks you <3

Collapse
 
riturajmahapatra profile image
riturajmahapatra •

Thanks for this i was just running amock as a headless chicken as why it is not working. Thanks a ton.

Collapse
 
aguspuryanto profile image
Agus Puryanto •

Error: If rewrites, redirects, headers, cleanUrls or trailingSlash are used, then routes cannot be present.

Collapse
 
joel12r profile image
Stoic •

Can I ask where you got the API for fetching movie details? I also want to build a similar application but having trouble finding the appropriate API

Collapse
 
kudakwashem profile image
Kudakwashe Masaya •

Awesome, thank you

Collapse
 
tulio-salvatierra profile image
Tulio Salvatierra •

This worked for me so thank you!

Collapse
 
notanerd profile image
Odunsi Oluwabukola •

It worked! Thank you

Collapse
 
itclmt profile image
ITClmt •

It works thank you so much

Collapse
 
alvarnydev profile image
alvarny.dev •

Thank you so much, that made it really easy to get it to work :)

Collapse
 
stanlisberg profile image
Stanlisberg •

I'm glad I could help @alvarnydev

Collapse
 
gitinitpriyanshu profile image
Priyanshu Bartwal •

It worked ! Thanks.

Collapse
 
stanlisberg profile image
Stanlisberg •

🙏

Collapse
 
lukeecart profile image
Luke Cartwright •

Thank you so much for this!! This was beginning to bug me!

Collapse
 
imiebogodson profile image
Imiebo Godson •

Thank you, man. Your article just helped me fix the same issue.👍

Collapse
 
stanlisberg profile image
Stanlisberg •

Glad it helped @imiebogodson 🙏

Collapse
 
sumonpaul55 profile image
sumon paul •

Thank you so much. it's working for me.

Collapse
 
iotfk profile image
iotfk •

my error still there

Collapse
 
dravidjones28 profile image
dravidjones28 • • Edited

Thank you Dude! God bless you!
I Fixed it.

Collapse
 
stanlisberg profile image
Stanlisberg •

You are welcome @dravidjones28 . I'm happy to help.

Collapse
 
avkravchenko profile image
Alexander •

Thank you so much!

Collapse
 
stanlisberg profile image
Stanlisberg •

You are welcome. 👍

Collapse
 
muhammad_rafiq_25dac731e6 profile image
muhammad rafiq •

great its working for me can you let me know is this solution is only for related vercel

Collapse
 
rhythmicrhythm profile image
Rhythmic Rhythm •

Thank You very much

Collapse
 
neerajghatage profile image
Neeraj Ghatage •

Would u plz help me?.....i can't even load my website on Google when I refresh it 5-6 times then it loads the website

Collapse
 
ziyadbeyg profile image
MIRZA ZIYAD AHMED BAIG •

Thanks Man 🙌
It worked for me and i appreciate your efforts.

Collapse
 
mrhawking profile image
mrhawking • • Edited

Thank you a lot, I solved that problem in 3 sec and it works now!

Collapse
 
tlanettepollard profile image
T. Lanette •

Thank you it worked!

Collapse
 
reikoka profile image
ReiKoka •

Thank you for this, it fixed the issue with my deployment.

Collapse
 
simaomeyrer profile image
Simão Meyrer •

You helped me a lot man, thanks!

Collapse
 
stanlisberg profile image
Stanlisberg •

You are welcome @simaomeyrer .

Collapse
 
divinechile profile image
Divine Chile •

Thanks!!! i've been struggling with this for a while 😅