How to redirect users after form submission?
By default, Webflow shows a success message inline when someone submits a form. But in many cases you want to redirect them to a dedicated thank-you page — for tracking, for upsells, or simply for a b
By default, Webflow shows a success message inline when someone submits a form. But in many cases you want to redirect them to a dedicated thank-you page — for tracking, for upsells, or simply for a better user experience.
Redirecting to a custom page in Webflow
Webflow has a built-in redirect option on every form element. No custom code required.
Steps:
- Open your project in the Webflow Designer
- Select the form element (click the form wrapper, not an individual input)
- In the right sidebar, go to the Element Settings panel (gear icon)
- Under Action, choose Redirect to another page
- Select the target page from the dropdown, or enter a custom URL
- Publish your site
After submission, visitors will be sent directly to that page instead of seeing the default success message.
Setting up a thank-you page
If you don't already have a destination page:
- Create a new static page in your Pages panel — name it something like "Thank You"
- Add your confirmation content, next steps, or conversion tracking pixels
- Publish the page, then set it as the redirect target following the steps above
Keep the thank-you page focused. Confirm the submission, offer any relevant next steps, and include tracking if needed.
Tracking form conversions
Redirecting to a separate page makes conversion tracking straightforward:
- Google Analytics — set up a destination goal for the thank-you page URL
- Google Ads / Meta Pixel — place the conversion pixel on the thank-you page only
- GTM — fire tags based on the page path matching your thank-you URL
This is cleaner than trying to track inline success messages, which require custom event listeners.
Redirecting with custom code
If you need more control — conditional redirects based on form data, for example — you can use JavaScript:
<script>
document.addEventListener('DOMContentLoaded', function () {
var form = document.querySelector('form[data-name="your-form-name"]');
if (form) {
form.addEventListener('submit', function () {
setTimeout(function () {
window.location.href = '/thank-you';
}, 1000);
});
}
});
</script>
Place this in Project Settings > Custom Code > Footer Code, or on the specific page's custom code section. Adjust the data-name attribute and redirect URL to match your setup.
The setTimeout accounts for Webflow's form validation — the redirect fires after submission completes.
Common pitfalls
- Page not published: The redirect target must be published before it works. Unpublished pages won't resolve.
- Form settings override: If you set both a success message and a redirect, the redirect takes priority after publish.
- Caching: If the redirect doesn't update after a change, clear your browser cache and republish the site.