Redirect URL to Post

This WordPress plugin provides an URL (something like http://www.example.com/?redirect_to=random) that takes you directly to a single post, as specified by the query parameters in that URL. You can, for example, redirect to a random post, your first post, your latest post, or use even more complex searches, like the latest post of author John Doe that is at least one month old.

These parameters define the order how WordPress will sort your posts, and the URL will redirect to the post that would appear on top of that list. While the URL remains unchanged, the destination of the redirection depends on the current post inventory.

Possible applications are:

  • Link to a random post.
  • Link to your first or your latest post.
  • Promote your latest post with one permanent link from a menu or in a newsletter. Readers won’t have to go through a list – the link will always take them directly to the latest post in single-post view. And you won’t have to manually update that link every time you publish a new post.
  • Link to the first post when you ever used a particular tag.
  • Add a menu item or button that links to a random post and increase page views (which is a SEO ranking indicator).
  • Load the latest post that contains a certain phrase into a frame of another website.

The plugin does not offer any settings in the admin back end. You achieve all via the parameters in the URL.

redirect url to post icon-256x256
redirect url to post banner

Some additional features:

  • Caching: The plugin offers caching of database query results, which reduces the burden on the database particularly when you use random posts.
  • Default target: Choose a post or page where the redirect will go if no matching post was found. By default, this is the home page.
  • Tracking: Append parameters to the resulting URL so that you can track the visitors in your web statistics (Google Analytics, Matomo, …).
  • Sticky Posts: Turn on or off whether to consider sticky posts.
  • Suppress filters: Turn on or off whether you allow other plugins (like multilingual plugins) to change the pool of posts.
  • Random with bias: Go to a random post, but with a higher probability to a group of old or new posts.

Watch that screencast, created by WPBeginner:

Check out my other plugins

Are your WordPress tags really helpful or are they just a big mess? Install the free plugin Tag Groups and organize your tags in groups – by topic, by year, by place, by anything.

Licenses and Credits

Please find the license information in the WordPress repository or on the About page of the plugin.

Tip Jar

Yes, this plugin is free but it takes much effort to maintain it and to provide support. Please donate to this charity or below to me. Your donation is a great way to keep me motivated!If you travel, please book your hotel via this affiliate link so that I will receive a percentage.If you find this plugin useful, I would also appreciate a five-star-rating.

Share