Gatsby Form not found by Netlify

I’m not able to POST my form using Gatsby and Netlify and I’m not understanding why.
The first obvious issue is this 404 I’m getting in my console.

POST https://dev.thesolarchampions.com/ 404
Fetch failed loading: POST "https://dev.thesolarchampions.com/".

Form isn’t in a modal or anything funky, and I have another site with nearly the exact same code working fine on Netlify. :man_shrugging:

My onSubmit looks like this

onSubmit: (values, actions) => {
  console.log(values)
  fetch("/", {
    method: "POST",
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    body: encode({ "form-name": "solar-leads", ...values }),
  })
    .then(() => navigate("/thankyou"))
    .finally(() => actions.setSubmitting(false))
},

Site name: thesolarchampions.netlify.app (with CNAME of dev.thesolarchampions.com pointing to it.)

Hey there @PatrickFranz :wave:

Sorry to be slow to respond here.

This Support Guide is the first port of call to debug any forms issues. Have you already read through this? There are also many other Support Guides for forms - you can find them here: #Netlify-support:support-guides

We also recommend trying to search the forums or look at topics tagged Netlify forms if you haven’t already - it’s likely your question was already asked by someone else!

If you are still having problems, please provide the following information:

  1. The URL for your live form as you want visitors to use it
  2. The URL of your deployed html form. In case you have a javascript form, we need to literally be linked to the html version you’ve deployed, as mentioned above (look for “ pure javascript form ”)
  3. The form name that you’ve set and that shows in our UI
  4. Any errors or logs from the Netlify build logs, dashboard or browser developer console
  5. Description of anything you have tried that did or didn’t help or make things better/worse