It seems that WP is adding a canonical to the root of my pagination, and no indexing all other pages on Category pages.

For example, /locations/residential/?_page=2 is no-index, and gives /locations/residential/ as canonical.

I have tried this to attempt to remove this for these Category pages, but Screaming Frog still says the pagination is no-index and rel=canonical to the root page.

add_filter( 'redirect_canonical','custom_disable_redirect_canonical' ); 
function custom_disable_redirect_canonical( $redirect_url ){
    if ( is_category() ) $redirect_url = false;
    return $redirect_url;

Any idea what I amdoing wrong?

  • WordPress doesn’t set pagination pages to noindex. Are you using an SEO plugin? Also, why does your pagination parameter have an underscore? Have you tried to implement your own pagination? – Jacob Peattie Apr 16 '20 at 12:07
  • I am using Yoast. I think the issue is appearing as i used a plugin to replace the grid on Category pages, and this is the pagination style it uses. I can set this to use my default theme pagination which is /page/2 which does indeed fix the issue. However, other areas of the site work correctly and still have pagination in the format/?_page=2 – Obsidian Apr 16 '20 at 12:19
  • Perhaps another question. If I set the category pages to use the default /page/2/ format, is there a rewrite rule I can use to change the other pagination to match. So I would need a rewrite rule to change /?_page=2 to /page/2/ to make the other areas of the site match – Obsidian Apr 16 '20 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.