Netlify forms doesn't work on custom domain, but does on site.netlify.app - Nextjs

Hi,

I added netlify forms to a Nextjs site following this article

And submissions work! But only on my site.netlify.app and not on the custom domain site.com website.

One major thing I noticed is that the cache storage is empty on the site.netlify.app website but populated on the custom domain site.com website.

After clearing cache on the website with the custom domain it worked. I also added the netlify-honeypot=“bot-field” field to the form and it’s associated inputs. Then I cleared cache and redeployed.

So far so good. It works now. But I want to prevent this from happening down the line. But is adding the netlify-honeypot=“bot-field” enough? Is there any configuration I need to do on netlify to prevent this?

__forms.html

<form
      name="contact-page-form"
      data-netlify="true"
      netlify-honeypot="bot-field"
      hidden
    >
      <input type="hidden" name="bot-field" />
      <input type="hidden" name="form-name" value="contact-page-form" />
      <input type="text" name="fullName" />
      <input type="text" name="email" />
      <input type="text" name="phone" />
      <input type="text" name="message" />
    </form>

    <form
      name="class-page-form"
      data-netlify="true"
      netlify-honeypot="bot-field"
      hidden
    >
      <input type="hidden" name="bot-field" />
      <input type="hidden" name="form-name" value="class-page-form" />
      <input type="text" name="fullName" />
      <input type="text" name="email" />
      <input type="text" name="phone" />
      <input type="text" name="message" />
    </form>

Hi @ecarrillo046,

Thanks for reaching out!

If I understand correctly, the form on your site is working correctly with a custom domain? If not, could you share the site name (such as site.netlify.app)?

For Spam prevention we have the following Docs:

Besides the honeypot you can also use reCAPTCHA:

Let me know if you need anything else.

I just tested this morning and it’s not working on the custom domain anymore.

Interesting so it looks like netlify received the form submission but it’s not appearing on the dashboard. Strange

Hmmm turns out some are marked as spam and so far honeypot has helped. Marking as resolved that honeypot field is doing it’s job.