splitforms.com
GITHUB PAGES CONTACT FORM

Your GitHub Pages contact form, done in 5 steps.

GitHub Pages only serves static files, so it has no server to process a form submission or send email. splitforms fills that gap: point your form’s action at https://splitforms.com/api/submit, add your free access key, and every submission lands in your inbox and dashboard — spam-filtered, free for up to 500 a month.

Get your free access key Full tutorial
POSTStatic HTML
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
  <input type="hidden" name="redirect" value="https://yourdomain.com/thanks" />

  <label>
    Name
    <input name="name" autocomplete="name" required />
  </label>
  <label>
    Email
    <input name="email" type="email" autocomplete="email" required />
  </label>
  <label>
    Message
    <textarea name="message" required></textarea>
  </label>
  <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" autocomplete="off" />
  <button type="submit">Send message</button>
</form>
01Why the form needs an endpoint

GitHub Pages serves files. It does not receive submissions.

A GitHub Pages form can render in the browser, but the Pages host cannot process the POST request or send email. Point the form action at splitforms and keep the site fully static.

No PHP

GitHub Pages has no PHP runtime or SMTP server.

No plugin

Jekyll plugins run at build time, not when a visitor submits a form.

No function

You do not need a serverless function, database, or deploy pipeline change.

02Setup

How to add a contact form to GitHub Pages

Same five steps whether the page is plain HTML or a Jekyll layout — no build plugin, no serverless function, no change to how Pages deploys your site.

  1. Create a free access key

    Sign up for splitforms and copy the access key for your form from the dashboard — no credit card required.

  2. Paste the form into your page

    Drop the HTML form below into index.html, contact.html, or a Jekyll _includes/contact.html partial. No build step or plugin needed.

  3. Add spam protection

    Keep the hidden botcheck honeypot field empty and add a form_loaded_at time-trap field so instant bot fills get filtered before they reach your inbox.

  4. Push to GitHub Pages

    Commit and push to your Pages branch as usual. GitHub rebuilds and redeploys the static site automatically — nothing changes on the hosting side.

  5. Test and check your dashboard

    Submit the live form once. The entry should appear in your splitforms dashboard and land in your inbox within seconds.

03Spam protection

Block spam on a GitHub Pages contact form

The page stays fully static — splitforms does the filtering server-side before a submission ever reaches your dashboard or inbox.

Honeypot

The hidden botcheck field must stay empty. Bots fill every input; real visitors never see it.

Time-trap

The form_loaded_at field records when the page loaded, so instant bot submissions get flagged.

Rate limits

6 submissions per minute and 20 per 15 minutes per IP — extra requests get an HTTP 429.

The time-trap field is the one part of this setup that needs a few lines of script, since the timestamp has to be stamped when the page loads:

<input type="hidden" name="form_loaded_at" id="form_loaded_at" />
<script>
  document.getElementById("form_loaded_at").value = Date.now();
</script>

Every form also supports a per-form allowed-domains list and strict origin mode, plus an optional reCAPTCHA v2 checkbox if you bring your own secret. See the full spam protection reference in the docs.

05FAQ

GitHub Pages contact form FAQ

Can GitHub Pages process contact forms?

No. GitHub Pages only serves static files, so it cannot run PHP, Node, Ruby, or a server-side mail handler for each submission. A hosted form backend receives the POST request instead.

Does this work with Jekyll on GitHub Pages?

Yes. Paste the form into a page, layout, or _includes/contact.html partial. The rendered HTML submits to splitforms, so no unsupported Jekyll plugin is required.

Do I need JavaScript for a GitHub Pages contact form?

No. A native HTML form with method POST works on its own. The only exception is the optional form_loaded_at time-trap field, which needs a few lines of script to stamp the load time — everything else works with plain HTML.

How do I stop spam on a GitHub Pages form?

Add the hidden botcheck honeypot field and the form_loaded_at time-trap field, then let splitforms run server-side spam checks and IP rate limiting. That keeps the page static while filtering junk submissions before they reach your inbox.

Is there a free contact form for GitHub Pages?

Yes. The splitforms Free plan includes 500 submissions a month, unlimited forms, owner email notifications, spam filtering, and dashboard storage — no credit card required.

Does a GitHub Pages contact form work with a custom domain?

Yes. If your GitHub Pages site uses a custom domain, add that domain to the form's allowed-domains list in your splitforms dashboard so submissions sent from it are accepted.

Can I redirect visitors to a thank-you page after they submit?

Yes. Add a hidden redirect field with your thank-you page URL, and splitforms sends the visitor there after a successful submission.

What happens if my GitHub Pages form gets spammed with rapid submissions?

splitforms rate-limits submissions to 6 per minute and 20 per 15 minutes per IP address. Requests past that limit get an HTTP 429 response instead of reaching your dashboard.

Make your GitHub Pages form work.

Free includes 500 submissions per month, owner email notifications, dashboard storage, and spam filtering. Need more volume? Compare plans.

Get started free