On Headless Wordpress Setup Sitemap URL issue

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

    I apologize for the inconvenience you are facing with the Rank Math SEO plugin’s sitemap URL on your Headless WordPress setup. In your case, where the backend setup is on a different URL (https://rankmath.com/kb/wordpress-hooks-actions-filters/#rank-math-php-file) and the frontend is on another URL (https://rankmath.com/kb/wordpress-hooks-actions-filters/#rank-math-php-file), the sitemap URLs generated by Rank Math are reflecting the backend URLs instead of the frontend URLs.

    To resolve this issue and have the sitemap URLs display correctly on your frontend URL (`https://rankmath.com/kb/wordpress-hooks-actions-filters/#rank-math-php-file), you may need to adjust the sitemap settings or make modifications to the plugin’s behavior. Unfortunately, the provided context does not cover this specific scenario.

    I recommend replying to your existing ticket with this detailed information so that a human agent from the Rank Math Support team can assist you further with a tailored solution for your Headless WordPress setup.

    Thank you for your understanding, and we look forward to helping you resolve this issue promptly.

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    Why Did My Website Disappear From Google Search? » Rank Math

    I don’t understand properly, could you please explain me step by step way?

    Hello,

    Thank you for contacting support.

    In this case, you need to use the following filter to update the URL of the pages before they get added to the sitemap: https://rankmath.com/kb/filters-hooks-api-developer/#filter-sitemap-item

    The modifications need to be done on the following array key $url['loc'] which contains the URLs of the posts and pages being added to the sitemap.

    You can create a catch function to check the URL and remove the subfolder you need to remove from them.

    Don’t hesitate to get in touch if you have any other questions.

    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 ‘On Headless Wordpress Setup Sitemap URL issue’ is closed to new replies.