Hello,
I apologize for the inconvenience you are facing. To serve the Rank Math sitemap from a different URL than the frontend URL, you can follow these steps:
-
Update Home URL in WordPress General Settings:
- Set the Home URL to
api.example.com
in your WordPress General Settings.
-
Update Rank Math Sitemap URL:
- After updating the Home URL, the Rank Math sitemap will be available at
api.example.com/sitemap_index.xml
.
By updating the Home URL in your WordPress settings, you can ensure that the Rank Math sitemap is served from api.example.com
instead of example.com
.
If you encounter any issues or need further assistance, please feel free to reach out.
Thank you for raising this concern.
Sources:
How to Enable Headless CMS Support in Rank Math? » Rank Math
Rank Math General Settings
Rank Math Sitemap Issues and Their Fixes » Rank Math
How to Whitelist Rank Math in Cloudflare » Rank Math
I want to use example.com as a home URL because of setting front-end URLs for links serving in post list.
Hello,
Thank you for contacting support.
We have a Headless CMS feature but it doesn’t include support for the sitemaps, so this cannot be done programmatically using our plugin.
The support for GraphQL is not done by our team so if you need help figuring out the sitemaps using that method you can get in touch with the team responsible for creating that compatibility layer.
The feature we mentioned above and maintained by our team is only for the metadata: https://rankmath.com/kb/headless-cms-support/
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.