splitforms.com

Contact form · GitHub Pages

GitHub Pages contact form, no backend needed.

GitHub Pages only serves static files, so it has no server to catch a form submission. Point your form at one splitforms endpoint and every message lands in your inbox and dashboard — spam-filtered, free for your first 500 submissions.

  • 500 free / month
  • 5-step setup
  • No backend
A GitHub Pages contact form submitting to the splitforms hosted endpoint

Key benefits

No backend or PHP

GitHub Pages has no PHP runtime or mail server. Your static form posts to one hosted endpoint instead.

Spam filtered

Honeypot, time-trap, and per-IP rate limits screen bots before they ever reach your inbox.

Owner notification email

Accepted submissions are saved to your dashboard before owner notification email is attempted; delivery time and inbox placement depend on provider and recipient settings.

Copy-paste ready

GitHub Pages contact form HTML, ready to paste.

Drop this into index.html, a contact page, or a Jekyll partial, point the action at the endpoint, and add your access key. The whole change is a single attribute — no PHP, no plugin, no build step.

index.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>

How to add it

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.

Step 1 of 5

Create a free access key

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

Step 2 of 5

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.

Step 3 of 5

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.

Step 4 of 5

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.

Step 5 of 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.

You're all set ✓

Why an endpoint

Why a GitHub Pages contact form needs an endpoint.

The browser renders your form fine — the problem is the submit. GitHub’s servers have no process to catch the POST, validate it, or email it to you. splitforms receives that request at a hosted HTML form backend, so your repo stays fully static and nothing about how Pages deploys has to change.

  • No PHP runtime or SMTP server to send mail on submit
  • No Jekyll plugin — those run at build time, not on submit
  • No serverless function, database, or deploy pipeline change
A static GitHub Pages form POSTing to a hosted endpoint that routes the message to your inbox

Spam protection

How do you stop spam on a GitHub Pages form?

The page stays fully static — splitforms filters server-side before a submission reaches your dashboard. The hidden botcheck honeypot and the form_loaded_at time-trap catch bots, and per-IP rate limits stop floods. See the full spam protection reference in the docs.

  • Honeypot: the hidden botcheck field must stay empty
  • Time-trap: form_loaded_at flags instant bot submissions
  • Rate limits: 6 / min and 20 per 15 min per IP, then HTTP 429
Server-side spam filtering for a static GitHub Pages contact form

Jekyll & custom domains

Does a GitHub Pages form work with Jekyll and a custom domain?

Your form keeps its existing fields, layout, and styling — only the action URL points at splitforms. The same static HTML works for plain pages, a reusable Jekyll contact form partial, and custom domains alike.

  • Works with plain HTML, Jekyll layouts, and _includes partials
  • Add your custom domain to the form's allowed-domains list
  • Pro ($5 per month) adds signed webhooks and CSV, XML, PDF export
A GitHub Pages contact form working across Jekyll and custom domains via splitforms

Questions

GitHub Pages contact form questions.

Anything missing? Email us, we read every message.

A person reading answers to common questions
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.

Show 2 more questions
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.

View all FAQs

Make your GitHub Pages contact form work.

Free includes 500 submissions a month, owner email notifications, dashboard storage, and spam filtering — no credit card, no server, no plugin. Need more volume? Compare plans anytime.

  • No credit card required
  • 500 free submissions
  • Setup in minutes
Two people celebrating a working contact form