Newsletter Hero

Topic summary

A user built a custom newsletter signup hero section but encounters a 404 error when visitors submit their email addresses. The goal is to offer new subscribers a 10% discount on their first purchase through an automated email.

Root Cause Identified:
The form action likely isn’t properly connected to Shopify’s native newsletter functionality, causing submission failures.

Recommended Solutions:

  • Integration Setup: Connect the form to Shopify Email or a third-party service like Klaviyo
  • Automated Flow: Create a welcome automation that triggers on subscription and delivers the discount code (either one-time use or generic like WELCOME10)
  • Code Fix: Ensure the form submits to the correct Shopify endpoint with proper hidden fields (form_type="customer", name="contact[email]")

A code example was provided showing the correct form structure. The issue remains unresolved, with an offer to review the actual code if shared.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

Hi.

Some days ago, I created a Newslatter Hero after some codding, but when I try to introduce an email and save it, it leads me to a 404 page.

I did this because I want to give people who join, a 10% discount in their first buy, so it’s also have to be connected to an automatized email (I don’t know if this part is important to mention)

Can somebody help me?

I can give you access to the code and the shop.

Thank you all.

1 Like

Hi Infinitywings,

Sounds like you’re almost there. Great job in getting the newsletter section done and looking good.

That 404 error when someone submits their email usually means the form action isn’t properly connected to Shopify’s native newsletter functionality.

Here’s what you can check:

  1. Make sure the form is correctly integrated with Shopify via a channel like Shopify Email or Klaviyo.
  • Then, create a welcome flow that triggers when someone subscribes.

  • The discount code can be a one-time use or generic (e.g., WELCOME10), depending on your setup.

  1. Make sure the form is submitting to the correct endpoint

In your code, the form should look something like this:

Subscribe

Happy to take a look at your code if you’d like—feel free to share access or paste the relevant snippet here.