How to set the allowed origin (and fix “Origin not allowed”)
Every form endpoint has an allowed origin (your website domain). Forms.fyi uses it to protect you from other sites submitting to your endpoint from a browser.
What “Origin” means
When a browser submits a form or makes a fetch request, it usually includes an HTTP Origin header like:
Origin: https://www.example.com
Forms.fyi compares that value to the allowed origin you set on the form. If they don’t match, the submission is rejected.
Set the allowed origin correctly
- Include the protocol (
https://vshttp://). - Match the exact host (for example
www.example.comis different fromexample.com). - Ports matter in development (for example
http://localhost:3000).
Fix “Origin not allowed”
This error most commonly happens in these cases:
- You set the allowed origin to
https://example.combut your site is actually served fromhttps://www.example.com. - You’re testing on localhost but the allowed origin is your production domain (or vice versa).
- You’re submitting from a preview domain (like a staging URL) that doesn’t match the form’s allowed origin.