Canonical Question

#752024
Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello, I understand your concern about setting up a canonical URL for filtered or paginated pages to point back to the initial page. To achieve this in Rank Math, you can follow these steps:

    1. Edit the Filtered/Paginated Page:

      • Go to the page you want to set a canonical URL for, like https://www.yourwebsite.com/tag/product-1/]`.
    2. Access Rank Math Meta Box:

      • Scroll down to the Rank Math SEO meta box while editing the page.
    3. Set Canonical URL:

      • Look for the Canonical URL field in the Advanced Tab of the Rank Math meta box.
      • Enter the canonical URL you want to point to, in this case, https://www.yourwebsite.com/tag/product-1/
    4. Update the Page:

      • Save or update the page to apply the changes.

    By setting the canonical URL using Rank Math as described above, you can instruct search engines like Google to consider the initial page as the main source of content for all filtered or paginated versions.

    If you encounter any issues or need further assistance, feel free to reach out. Thank you for raising this concern!

    Sources:
    Advanced Tab in Rank Math SEO’s Meta Box
    Bulk Editing Options in the Rank Math SEO Plugin
    Alternate Page with Proper Canonical Tag Status in Google Search Console » Rank Math
    How to Fix ‘Duplicate, Submitted URL Not Selected as Canonical’ Issue in Google Search Console » Rank Math

    Hi that would be ok but the pagination is created dynamically so there is no page for the pagination

    Hello,

    Apologies for the inconvenience.

    In this case, please add this code to set the canonical to the base URL without the filter:

    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
    	if ( ! empty( $_GET['?filters='])) {
    		$current_url = add_query_arg( $_GET, home_url() );
    		$canonical = esc_url( $current_url );
    	}
    	return $canonical;
    } );

    And here’s a guide to adding the code to the website:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how this goes.

    Ok Thanks
    Can you tell me what the difference in terms of SEO would be to doing it this way and adding the base canonical or using the interface to Noindex Paginated Single Pages, Noindex Search Pages, Noindex Sub Pages

    Alhan
    Rank Math free

    Hello,

    Setting a canonical URL is generally the preferred approach when you want to keep dynamically generated pages accessible to users but ensure that search engines focus on the original page for ranking purposes.

    Noindexing is more suitable when the additional pages do not provide value in search results or when you want to streamline the content that search engines index.

    Both strategies are valid but are used in different scenarios depending on your SEO goals and how you want search engines to treat the content on your website.

    We hope that helps, and please don’t hesitate to get in touch if you have any other questions.

    Thank you.

    So if I use the snippet above suggested by Reinalle should I then disable the options Noindex Paginated Single Pages, Noindex Search Pages, Noindex Sub Pages in

    DASHBOARD / SEO TITLES & META / MISC PAGES

    Hello,

    Yes, you should disable those options if you want to set the main page URL as the canonical URL of the paginated pages.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thanks

    Alhan
    Rank Math free

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on TrustPilot about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Canonical Question’ is closed to new replies.