Skip to content
Wrenform

Docs / Hosting

Contact form for GitHub Pages

GitHub Pages serves static files only. Post the form to Wrenform and every real submission reaches your inbox, with spam filtered.

Last updated 2026-11-17View as Markdown
<form action="https://wrenform.com/f/YOUR_FORM_ID" method="POST">
  <input type="text" name="name" required>
  <input type="email" name="email" required>
  <textarea name="message" required></textarea>
  <input type="text" name="_honey" style="display:none" tabindex="-1" autocomplete="off">
  <button type="submit">Send</button>
</form>
<!-- Optional: a timing check against bots, and data-ajax to submit in place -->
<script src="https://wrenform.com/js/v1/form.js" defer></script>

Steps

  1. Create a form and copy its form ID, or let your AI tool create one without an account.
  2. Put the form in any page of your site, with your form ID in the action. It's plain HTML, so it works with Jekyll, Hugo, Eleventy or hand-written files.
  3. Add a thank-you page, for example thanks.html, and set its full address as the form's Redirect to, for example https://USERNAME.github.io/thanks.html. See redirects.
  4. Commit and push. GitHub Pages publishes the site as usual.
  5. In the form's settings, add your site under Allowed origins: https://USERNAME.github.io, or your custom domain such as https://example.com.

A project site at https://USERNAME.github.io/REPOSITORY/ has the origin https://USERNAME.github.io: an origin never includes the path. GitHub Pages has no server, and it doesn't need one here: the visitor's browser posts the form to Wrenform.

Ask your AI

Add a contact form to this GitHub Pages site using Wrenform. Use plain HTML that posts to https://wrenform.com/f/YOUR_FORM_ID with method POST, with name, email and message fields and the hidden _honey field. Add a thank-you page. Don't build a backend or use mailto. Then tell me to add the site's address under Allowed origins in Wrenform.

No form ID yet? The prompts for AI builders let the tool create one without an account.

Using Jekyll or Hugo

GitHub Pages builds Jekyll sites by itself. For an include that keeps the form ID in _config.yml, see the Jekyll guide. For Hugo, see the Hugo guide.

Test it

Open the published page, send the form, and you should land on your thank-you page. The submission shows in your dashboard and arrives by email. The first time, confirm the recipient address from the email we send.

Common problems

  • origin_not_allowed. The site's address isn't under Allowed origins, or it differs: https:// and the exact host, with no path. See errors.
  • You see our thank-you page, not yours. Redirect to is empty, or it isn't an https:// address.
  • No email arrives. The recipient hasn't confirmed yet. See notifications.

Next steps

Something wrong or unclear on this page? Report a problem: write to hello [at] wrenform.com with the page address (/docs/hosting/github-pages).