Title: [Plugin: Redirection] redirect by keywords?
Last modified: August 20, 2016

---

# [Plugin: Redirection] redirect by keywords?

 *  [centepines](https://wordpress.org/support/users/centepines/)
 * (@centepines)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-redirection-redirect-by-keywords/)
 * Hi, is there a way to redirect by keywords? Let’s say one visitor searchs for“
   moon” and I want all “moon” searches from Google to land in a certain page?
 * If it is possible, what is the code I should set on Redirection?
 * Thanks in advance 🙂
 * [http://wordpress.org/extend/plugins/redirection/](http://wordpress.org/extend/plugins/redirection/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-redirection-redirect-by-keywords/#post-2135464)
 * Yes there is. Have you got a limited number of search phrases for which you want
   to do this or do you want to do this for all phrases ?
    Have you got some example
   referer urls for me to work with ? And some more info on where you want to redirect
   to ?
 *  Thread Starter [centepines](https://wordpress.org/support/users/centepines/)
 * (@centepines)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-redirection-redirect-by-keywords/#post-2135484)
 * Yes , please bear my English 🙂
 * Google is sending me lots of visits to a page that is incorrect for the search
   terms people enter. I guess it’s because the old page ranks better, but it has
   nothing to do…anyways, weird Google thing.
 * I would like to redirect those visitors to the correct page.
 * They come strictly from Google, but google.com, google.co.uk, google.com.au, 
   etc, looking for a 4 keyword phrase, let’s just say “ultimo video de Marley”
 * I have no idea how to properly redirect those from the plugin. I guess the example
   you will give, will work with some other phrases – that would be awesome and 
   I really thank you for that 🙂
 * Hope you can understadn this mess!
 * cheers
 *  Thread Starter [centepines](https://wordpress.org/support/users/centepines/)
 * (@centepines)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-redirection-redirect-by-keywords/#post-2135485)
 * Oh, visitors are landing on let’s say [http://www.mysite.com/old-video-page](http://www.mysite.com/old-video-page)
   instead of [http://www.mysite.com/new-video-page](http://www.mysite.com/new-video-page)
 * 🙂
 *  [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-redirection-redirect-by-keywords/#post-2135490)
 * Try and set up a new redirection with the following settings and let me know 
   how you get on:
 *     ```
       Source URL: /old-video-page
       Match: URL and referrer
       Action: Redirect
       Regex-box: ticked
       Target URL: /new-video-page
       ```
   
 * Once the redirect has been added, *edit* the redirection and add the following
   phrase to the referrer box and make sure the regex box to the right of it is 
   ticked as well:
    `^http://www\.google(?:\.[a-z]{2,4}){1,2}/(?:search|url)\?`
 * You will see that “Matched” is filled with the Target URL and “Not Matched” is
   empty. Leave those as they are to make sure that users who want to see the old
   page (for instance using an internal site link), can.
 * Note: the Source URL in the above example isn’t a regex and I told you to tick
   the box anyway. The reason for that is a small bug in the current version of 
   the Redirection plugin code. Currently, if you untick it, the referrer regex 
   box will be unticked too and that is not what you want.
 * Now, you can either set up this redirect for each of the pages for which you 
   want this to work or you can try and find some pattern to the old/new page URLs
   and create a regular expression for the Source URL too. Using your example from
   your previous reply, the regex would be:
 *     ```
       Source URL: /old-([a-z0-9_-]+)[/]?
       Target URL: /new-$1
       ```
   
 * Hope this helps 😉
 * Smile,
    Juliette

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Redirection] redirect by keywords?’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-redirection-redirect-by-keywords/#post-2135490)
 * Status: not resolved