How to Disable Automatic Redirects Or Notifications

Last update: 29 November, 2016
This guide is written for advanced users and developers. Looking for a web developer to customize our plugin? We highly recommend checking out Code Poet as they have a great list of available freelance WordPress developers.

The Yoast SEO Premium's redirects manager includes automatic redirect creation and redirect request notifications. In rare cases, you may prefer to turn off some of these features.

Disable Automatic Redirect Creation

Yoast SEO Premium monitors for URL changes and automatically creates a redirect. In most cases, this is ideal behavior in order to prevent visitors landing on a 404 error page.

You can disable this feature by adding the code below to the functions.php file of your theme:

Posts And Pages:

add_filter('wpseo_premium_post_redirect_slug_change', '__return_true' );

Taxonomies (Category, Tags, Etc)

add_filter('wpseo_premium_term_redirect_slug_change', '__return_true' );

Note: If you see the redirect created notification and you have not changed the URL or slug, this is most commonly caused by a conflict. Please check for conflicts by following the steps in this article.

Disable Redirect Notifications

When you delete a post, we display a reminded notification to add a redirect for the removed item. We highly recommend adding redirects for removed items.

You can disable these notifications by adding the code below to the functions.php file of your theme:

Notification to Add A Redirect When Deleting A Post or Page

add_filter('wpseo_enable_notification_post_trash', '__return_false');

Notification That An Automatic Redirect Was Created After Editing A Post or Page's URL

add_filter('wpseo_enable_notification_post_slug_change', '__return_false');

Was this article helpful? ·