Back to guides
Static Sites
5 min readUpdated 2026-05-03

How Do You Add a Form Backend to a Static Site?

Learn how to receive static site form submissions without writing an API server, including email notifications, spam protection, file uploads, and webhooks.

Quick answer

The fastest way to add a form backend to a static site is to point the form action at a hosted endpoint like SubmitKit. Your static HTML stays unchanged, while SubmitKit receives submissions, filters spam, stores entries, sends email notifications, and forwards webhooks.

Why do static sites need an external form backend?

Static sites can render HTML, CSS, and JavaScript, but they do not have a server process that can receive POST requests, store data, or send email. That is why a contact form on GitHub Pages, Astro, Hugo, Jekyll, or a static Vercel site needs a backend endpoint.

A form backend gives the form a destination. It receives the submission, validates the fields, blocks obvious bot traffic, stores the result, and notifies the site owner.

What is the simplest setup?

Create a form in SubmitKit, copy the endpoint, and use it as the form action. The page can remain fully static because the browser posts directly to SubmitKit.

<form action="https://submitkit.dev/api/f/YOUR_FORM_ID" method="POST">
  <input name="name" required>
  <input type="email" name="email" required>
  <textarea name="message" required></textarea>
  <button type="submit">Send</button>
</form>

What should a production form backend handle?

A production form should do more than deliver an email. It should protect the endpoint, preserve submissions, handle attachments, and give you a way to integrate with other tools.

  • Email notifications for every valid submission.
  • Spam filtering with honeypot fields, timing checks, and rate limits.
  • A dashboard to inspect, export, and search submissions.
  • File uploads with size limits.
  • Webhooks for CRMs, Slack, Notion, or internal workflows.

When should you build your own backend instead?

Build your own backend if the form is tightly coupled to proprietary business logic, requires custom authentication, or writes directly into an existing internal database. Use a hosted form backend when the goal is to receive submissions reliably without maintaining server code.