Edit Sitemap URLs

#15933
  • Resolved Mark Mcintyre
    Rank Math free

    Hello,

    The permalinks are set up on my site without a trailing slash, for example: abc.com/blog-post instead of abc.com/blog-post/.

    However, on the xml sitemap it is showing the post URLs correctly, but the pages are listed with a trailing slash for some reason. Is there a way to edit this or some other way to fix it?

    Thanks.

    • This topic was modified 5 years, 1 month ago by Mark Mcintyre. Reason: Added Wordpress login info
Viewing 14 replies - 1 through 14 (of 14 total)
  • Hello,

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

    Rank Math does not append the trailing on sitemap URLs, could you please check whether the issue could be resulting from a conflict with one of your installed plugins or some custom theme code by performing the steps outlined on this page: https://rankmath.com/kb/check-plugin-conflicts/

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    Thanks for the reply. I tried enabling only the RankMath plugin in troubleshooting mode but the trailing slashes were still there. I also tried turning off pages with the “Include in Sitemap”, saving, and then turning back on, but no change.

    Hello,

    Thanks for getting back to us.

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

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

    Thank you.

    Hi Mark,

    Thanks for getting back to us.

    Unfortunately the password shared is invalid. Could you please share a new password so that we can check this issue for you?

    We are looking forward to helping you. Thank you.

    Sorry about that, part of the password got cut off when I copied it.

    Hello,

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

    Thank you.

    Hello,

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

    Thank you.

    Hello,

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

    Thank you.

    Hello,

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

    Thank you.

    Hi Mark,

    Thanks for getting back to us.

    I have been able to login and I have passed this on to our dev team for closer investigation.

    We will be getting back to you in a short while. Thank you.

    Todd
    Rank Math free

    Hi Mark,

    We have added this code to your child theme’s functions.php file which has fixed the issue:

    add_filter( 'rank_math/sitemap/entry', function( $url, $type, $object ){
    	$url['loc'] = untrailingslashit( $url['loc'] );
    	return $url;
    }, 10, 3 );

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

    Great, thanks guys!

    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 https://wordpress.org/support/plugin/seo-by-rank-math/reviews/?rate=5#new-post 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 14 replies - 1 through 14 (of 14 total)

The ticket ‘Edit Sitemap URLs’ is closed to new replies.