How To Redirect First Time Commenters To a Thank You Page in WordPress

One cool feature of WordPress is being able to redirect first time commenters to a custom WordPress page.

Doing so allow the user get to know you and find interesting topics on your website or blog.

This is what I’ve found recently when made a first time comment in one of Mattew Woodward’s post. I’ve had been redirected to a thank you page.

Here’s how the page looks like.

Matthew Woodward's Thank You Commenting page
Matthew Woodward’s comment redirect in action.

The page design is so simple. But provide great details.

It basically says,

Hey, thank you for sharing your thoughts! I really loved what you have to say. And if possible, could you subscribe to my list? I can send you similar posts directly to your inbox.

Looks interesting, isn’t it?

In this article, I’ll walk you through how to redirect first time commenters in WordPress like the one you have seen above.

Redirect first time commenters

What You Will Learn From This Comment Redirect Guide

  1. How to create a comment redirect page – thank you page
  2. How to redirect first time commenters on WordPress using filter hook
  3. How to redirect first time commenters on WordPress using a plugin

How to create beautiful comment redirect page

The first thing you need to do is create comment redirect page in your WordPress admin area. This can be a thank you page.

You can also redirect users to a landing page or a special offer page. You can decide whether you want it long or short, that would be fine!

Made this page special, you can customize its design to make it looks beautiful.

Here are some tips on creating a comment redirect page to improve user engagement.

  1. Personal Message – In your redirect page, a personal message to the user means a lot.
    Not only it helps them know you better, it is also a way to appreciate one’s ideas/thoughts.
  2. Product or Services – This can be a great area to feature your product and/or services. If you are a web designer or a developer, you’ll want to let them know what you can offer and possibly give them freebies.
    In my case, I am offering a FREE WordPress blog setup to all qualified WPMakeSite users.
  3. Email Opt-in – Using some opt-in boxes or embedding your mailing list. You have to let them know few reasons why they should take this step. Like for example you have to send them relevant resources, tips, and more to keep them coming back to your site.
  4. Social Media – Adding your social media profiles to this page would let them know your social presence. And that they can follow you and add them to your network.
  5. Most Popular Post – Show the commenter some of your most popular posts and let them know that they might like to check them out as well. There’s a good possibility the user haven’t explore your website entirely. Doing so makes the user life easier going to your important pages/posts.

Using a drag & drop page builder WordPress plugin, you can create an awesome page. I highly recommend using Fusion Builder, which comes built-in with the famous and top selling WordPress theme of all time – Avada.

Fusion Builder Gif
(Source: Avada)

Alternative WordPress page builder plugin

  1. Page Builder by SiteOrigin
  2. Elementor
  3. Beaver Builder

Now, go to your WordPress dashboard and create a new page and name it as thank you for commenting. See this guide on how to create a page in WordPress to learn more.

You might need to include elements that I’ve listed above like a personal message, any product or services, email opt-in box, social media profiles, and your most popular posts.

So how do you redirect first time comments?

Alright, so here’s the fun part of actually redirecting first time comment to the thank you page we’ve just created. In this part, I’ll be discussing two methods: WordPress hook and using a WordPress plugin.

We’ll tackle each – one at a time.

Ready? Let’s go!

Redirect first time comments with a WordPress hook

WordPress offers hooks, a function that can be applied to an Action or a Filter.

These hooks are useful for theme and plugin developers in order to change some default WordPress functionality. In our case, we’re going to modify comment_post_redirect filter.

So, if codes are something you’re comfortable working with, this method is exactly what you need. All you have to do is copy + paste code snippet below and add it to your theme’s functions.php file.

Note: You MUST change “” to the page URL you wish to redirect first time commenter.

Using the code above, you can redirect first time commenters to thank you page.

But wait, let’s check what exactly each line of code means.

  • Line 2: Declare function wpms_redirect_first_time_commenters() Note: you can name this whatever you want
  • Line 5: Check user had actually leaves a comment
  • Line 8: Check if it’s the user first time comment
  • Line 15: Add the filter

There has to be an easier, way, right?

Yes and for beginners, I personally don’t recommend this method. So, we are going to use a plugin called Yoast comment hacks instead.

Install Yoast comments hacks WordPress plugin

The first thing you need to do is install and activate the Yoast Comment Hacks plugin. For more details, see this beginner guide on how to install a WordPress plugin.

Upon activation, go to Settings » Comment Hacks page to configure plugin settings.

This plugin is really great which makes comment management easier. It has four tabs which correspond to its feature. In this tutorial, we’re going to focus on the comment redirect feature.

Yoast Comment Hacks setting page

Clicking this tab allows you to configure another setting.

Since we already have created our redirect page, all you have to do is locate it using the drop-down.

When you are done, click on the Save Changes button.

That’s it! You’re all set.


Redirecting a user to some custom pages in WordPress could improve user engagement. You let them know how important their comments are and in return give them back the favor.

This is just some of the few methods. If you know a way to redirect first time commenters in WordPress, do let me know in the comment below.

And by the way, if you want to see WPMakeSite comment redirect in action, go ahead and leave a comment below and, if it’s your first time, you’ll be redirected to the thank you page.

Disclosure: This page may contains external affiliate links that may result in me receiving a commission if you choose to purchase the product or service at no additional cost to you.

10 Replies to “How To Redirect First Time Commenters To a Thank You Page in WordPress”

    1. Hey there, Kathy.

      Sure you will love it. It get’s my attention the first time I made a comment on Matt’s post. Really it will help your readers.

      I look forward seeing you did it soon.

      Thanks for dropping by.


  1. I had no idea that you could do that on WordPress, how cool! I am definitely going to start doing this with my new commenters.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.