• Resolved Henry

    (@henrybaum)


    I have a page that loads new pages via ajax, and every one of these pages is getting indexed with /?_page=x. Is there any way around this? No Index Paginated and No Pagination for Canonical URLs are active.

    • This topic was modified 3 years, 8 months ago by Henry.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Shivam Tyagi

    (@shivamtyagi)

    Hi @henrybaum ,

    The reason ‘No Index Paginated’ is not working on these pages is that your website is not using the default pagination by WordPress.

    You can use the aioseo_robots_meta filter to set these pages to noindex –
    https://aioseo.com/docs/aioseo_robots_meta/

    Here’s a code snippet that you can add to the functions.php file of your child theme or by using a plugin like Code Snippets

    add_filter( 'aioseo_robots_meta', 'aioseo_filter_robots_meta' );
    function aioseo_filter_robots_meta( $attributes ) {
        if ( ! empty( $_GET['_page'] ) && 1 < (int) $_GET['_page' ] ) {
            $attributes['noindex'] = 'noindex';
        }
        return $attributes;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘No Index with Ajax’ is closed to new replies.