Include custom canonical in sitemap

#290299
  • Resolved Heath
    Rank Math free

    Hi

    I have my WordPress site sitting behind a reverse proxy and would like to use the Rank Math sitemap however my ‘pages’ have a customer canonical tag site and are not showing up in the site map. Is there a way to get rank math to include the canonicals in the site map?

    Below is an example of the WordPress URL and then how URL is configured with reverse proxy and also what the canonical is set to

    WP URL – https://mysite.com/blog/contact
    actual URL – https://mysite.com/pages/contact

    If Rank math can’t do this, any suggestions on best way to achieve this?

    Thanks in advanced for the help

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

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

    You can use the following filter to add the URLs manually in your sitemap: https://rankmath.com/kb/filters-hooks-api-developer/#add-extra-urls-in-sitemap

    Hope this helps. Let us know if you need any other assistance.

    Heath
    Rank Math free

    Hi Jiadeep

    Thanks for the quick reply. So just to clarify, this is to add each URL that has a canonical added manually. Is there any setting or option to add the canonical to sitemap automatically?

    Hello,

    Unfortunately, there is no way to do this automatically. You will have to add the URLs manually in the sitemap.

    Hope this clarifies your doubts. Let us know if you need any other assistance.

    Thanks.

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Include custom canonical in sitemap’ is closed to new replies.