Explore Bato Web Agency Webflow Certified Partner Profile Explore Bato Web Agency Webflow Certified Partner Profile

How do you create a thank-you page redirect in Contact Form 7?

Illustration without a description Illustration without a description

Contact Form 7 normally displays a success message on the same page. A separate thank-you page is optional; analytics can track the plugin’s submission events without a redirect. Use a redirect only when the next page gives the visitor useful instructions or starts a specific follow-up flow.

 

For a custom implementation, listen for Contact Form 7’s wpcf7mailsent DOM event and change the browser location after a successful mail action. Place the script in a child theme or managed code area, scope it to the correct form ID, and use the final HTTPS URL. The old on_sent_ok setting is obsolete.

 

Test validation errors, spam rejection, mail failure, and successful submission. Only the success case should redirect. Contact Form 7 DOM events depend on AJAX, so a broken REST request or disabled JavaScript prevents the handler from running. Check analytics for duplicate events and exclude the thank-you page from search if it has no independent value.