Your Webflow form is likely failing on the live environment due to CORS policy violations or server misconfigurations causing an HTTP 500 error. This typically differs from staging due to custom code or domain mismatch.
- Go to Designer > Select the Form Wrapper.
- Ensure the Form Action is not manually pointing to a third-party endpoint or custom server unless required.
- Webflow-native forms should have no action or use
action="#"
(Webflow handles this internally).
2. Compare Custom Code Between Environments
- Go to Project Settings > Custom Code (Head and Footer).
- Look for any JavaScript that might intercept form submission (e.g., with
fetch()
or XMLHttpRequest
). - If you’re making API calls to a custom server or service, ensure CORS headers (like
Access-Control-Allow-Origin
) are properly configured to include your live domain.
3. Check Domain Whitelisting in Webflow Settings
- If you're using Webflow’s built-in form handling, make sure your live custom domain is published and connected properly.
- Webflow form submissions will fail if the domain isn’t added and verified under Hosting > Custom Domains.
4. Handle HTTP 500 Server Errors
- An HTTP 500 error usually implies that the server receiving the submission had an internal processing issue.
- If you're not using Webflow forms and are submitting to a custom server, check:
- The server logs to identify the cause.
- That the server supports requests from both staging and production domains.
5. Verify CORS Policy at the Server Level
- Your server or third-party endpoint must return the correct CORS headers.
- The most critical one is:
Access-Control-Allow-Origin: https://your-live-domain.com - A wildcard (
*
) may also be used, but it doesn't work for authenticated requests.
- Use DevTools > Network tab to check:
- The actual request URL.
- Whether there are preflight (
OPTIONS
) requests that fail. - The exact CORS error message for clues on what’s missing or blocked.
Summary
Your form fails on the live site due to a CORS error and server issue, likely tied to domain misconfiguration or custom code. Ensure your live domain is whitelisted, custom endpoints allow CORS from that domain, and remove any custom form logic that could interrupt Webflow's default handling.