smartformify
Pricing
Form Endpoints

Fix domain and CORS errors

2 min read

Domain restrictions control which websites may submit. CORS controls whether browser JavaScript can read a response from another server. Check the response message to find the underlying problem.

Check the submitting website

  1. Compare the published website's hostname with the endpoint's allowed domains. Include an intended preview domain when testing.
  2. Use the full API submission URL from your account, without routing through another website or redirect.
  3. Test from the published HTTP or HTTPS website, rather than opening an HTML file directly.

For developers

Inspect OPTIONS and POST in the Network panel. With allowed domains configured, the endpoint needs a valid website Origin or Referer. An explicit disallowed Origin cannot be replaced by Referer. Server-side integrations must account for this source check rather than assuming browser headers are forwarded automatically.

Allowed domains match hostnames: example.com covers www.example.com and its subdomains. Approve the narrowest domain you need, especially for shared preview hosting.

Common questions

Why does production work but localhost fail?

A production domain does not cover localhost. Use a separate test endpoint without an allowed-domain list, or an approved HTTPS preview hostname. The domain-entry validator expects a dotted domain; keep production restrictions in place.

It works in Postman but not the browser. Why?

Postman does not enforce browser CORS. Check the browser's preflight response, source domain, HTTPS connection, and Console errors. Do not use mode: 'no-cors'; it hides the response from your script. Access-Control-Allow-Origin belongs on the server response, not your request.

If the request reaches the endpoint but is rejected for another reason, follow submission troubleshooting.

Related articles

Keep going with the next product setup task.

Connect HTML, JavaScript, React, and Next.js forms

Keep your website's form and design. Connect it to a SmartFormify endpoint to receive answers in your response dashboard. Connect your form Open your endpoint, enable it, and copy...

Fix missing form submissions

If an answer is missing, check whether the website sent the form, whether the endpoint accepted it, and whether you are viewing the correct response dashboard. Check these first...

Understand submission limits

A limit can come from repeated requests, a daily allowance, your account's plan, or a restriction set on the form. Read the message before retrying. Choose the right next step...

Was this helpful?

Your answer helps us improve the Help Center.

Contact support