Page duplicate

#34316
Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello,

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

    Could you please do the following:

    1. Head over to WordPress Dashboard > Settings > Permalinks

    Hit the save button once.

    2. Go to WordPress Dashboard > Rank Math > Sitemap Settings

    Hit the save button once.

    That should fix the issue.

    If it doesn’t, please do let us know so we can look at this further.

    Hi Michael,

    I just tried your suggested solution but it didn’t work as you can see in the following screenshot:

    https://www.screencast.com/t/bXqk046F5

    I’ve added WP credentials so you can look at it.

    Thanks.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    HI Mark,

    Thanks for the follow up.

    I suspect that the word blogue on your permalink structure might be causing this problem.
    I have passed this on to our dev team for closer investigation and we will be getting back to you in a short while.

    We appreciate your patience. Thank you.

    Thanks for the feedback Michael! I’ll be waiting for your update.

    Todd
    Rank Math free

    Hi Mark,

    Thanks for your patience.

    That is showing up because you are using it as a dedicated blog page and you have the same structure in permalinks as well.

    Having the same URL in two places will not have ANY effect on your crawling. If you wish to remove a URL, you can use this filter: https://rankmath.com/kb/filters-hooks-api-developer/#change-remove-post-url

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

    Many thanks for the info Todd!

    May I ask where I must add the code? Also, where must I enter my website information in the code?

    The absolute URL I wish to remove is : https://twistmarketing.ca/blogue/
    And the sitemap I wish to remove it from is : https://twistmarketing.ca/post-sitemap.xml

    /**
    * Filter the URL Rank Math SEO uses in the XML sitemap.
    *
    * Note that only absolute local URLs are allowed as the check after this removes external URLs.
    *
    * @param string $url URL to use in the XML sitemap
    * @param object $post Post object for the URL.
    */
    add_filter( ‘rank_math/sitemap/xml_post_url’, function( $url, $post){
    return $url;
    }, 10, 2 );

    Thanks a lot Todd!

    Hello,

    Please add the following filter code in your theme’s functions.php file:

    
    add_filter( 'rank_math/sitemap/entry', function( $url, $type, $object ){
        if ( 'https://twistmarketing.ca/blogue/' === $url[ 'loc' ] ) {
    	return false;
        }
        return $url;
    }, 10, 3 );
    

    I hope that helps.

    Many thanks Pratik!

    It works just as expected! 🙂

    Todd
    Rank Math free

    Hi Mark,

    We are so glad to be of help. We are always here if you need us in the future.

    Hey, if it isn’t too much to ask for – would you mind leaving us a review here?

    https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post

    It only takes a couple of minutes but helps us tremendously.

    It would mean so much to us.

    Thank you.

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

The ticket ‘Page duplicate’ is closed to new replies.