Issue with Form Submission on Netlify - 404 Not Found for __forms.html

Dear Netlify Support Team,

I am currently using Next.js v14 and have followed the documentation for “Next.js 13.5+ on Netlify” to build a form on my site. However, when attempting to submit the form, I encounter a 404 Not Found error for the __forms.html file, which causes the submission to fail.

To troubleshoot, I also cloned the repository from Next.js Platform Starter and deployed it to Netlify without making any modifications. Unfortunately, the same error occurs upon form submission.

Here are the details of the issue:

  • Next.js version: v14
  • Repository used: Next.js Platform Starter
  • Documentation followed: Next.js 13.5+ on Netlify
  • Error: 404 Not Found for __forms.html upon form submission

I have double-checked the documentation and my deployment setup, but the issue persists. Could you please provide guidance on how to resolve this issue, or let me know if there are additional steps needed for setting up form submissions with Next.js on Netlify?

Thank you for your assistance.

Hi @koodori,

Thanks for reaching out and welcome to Netlify’s Support Forums!

Could you let us know the sitename (for example, sitename.netlify.app) where you’re seeing submissions reach the 404?

I have a basic Netlify form setup on Next.js 14 (using Netlify/Next.js runtime v5), if you want to compare your form:

JS:

the hidden form in html:

Let us know if you have any questions.

Thank you for your response and support!

The form I am currently working on is located at:

I also cloned the repository from https://github.com/netlify-templates/next-platform-starter and deployed it without any modifications here:
Classics | Netlify

I will also try the code you suggested and let you know if I encounter any issues.

By the way, is there any specific configuration required on Netlify for form submissions that I might have missed?

Did you enable Form Detection for the sites?
https://docs.netlify.com/forms/setup/#enable-form-detection

Thank you for the suggestion!
I enabled Form Detection on both sites and redeployed them. After doing so, the form submission worked successfully.
Thanks again for your help!

1 Like

glad to hear you were able to get your form working!