User selected canonical of all pages are http variant of the page

#656098
  • Resolved whoofey ads
    Rank Math free

    user selected canonical on the advanced tab of rank manth settings are http variant of the same page as a result all pages are non indexable on google whwn checking with screaming frog tool
    this issue is killing my traffic everyday how to resolve this issue for all pages at once

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    By default, Rank Math adds self-referencing canonical URLs on your pages. In this case, can you please share a screenshot using a tool like https://imgur.com/upload so we can check this further for you?

    Meanwhile, you can try to use the following filter on your website to set self-referencing canonical all over your website.

    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
        global $wp;
        $current_slug = home_url( $wp->request );
        $canonical = $current_slug . '/';
        return $canonical;
    });
    

    Here’s how you can add filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Please note that this filter will only work on the front end of your pages. You can check the canonical URL from the page source of the affected pages.

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘User selected canonical of all pages are http variant of the page’ is closed to new replies.