Home
Support Forums

Failed to load resource: the server responded with a status of 404 () - smitavadlamani.com

Hello there -

I am getting a “Failed to load resource: the server responded with a status of 404 ()” error when i deploy to netlify.

My website is smitavadlamani.com and I have a simple signup form using mailchimp API and express server. The code works perfectly locally. It gives me that error on deployment.

Can someone help please?

Thank you

When/where exactly are you receiving this error? Your site (page) loads, I see no 404s.

The only issue I found was trying to submit the signup form resulted in a 404 when posting to /api/subscribe, likely because you haven’t set up the rewrite/proxy for this correctly.

yes. on the subscribe page. is there any documention on how to set up the rerite/proxy?

There is.

I am new to coding. Do i need to create a netlify configuration file in my nuxt project?

will i use something like this - GitHub - nuxt-community/netlify-files-module: Nuxt module to create new _headers, _redirects and n - to fix this?

You need to create a serverless function and set up a rewrite to it (e.g. /api/subscribe). There is an example function here for reference.

You will need to set up a _redirects file or netlify.toml with the rewrite, but you need to get your function (as above) working first.