Yoast SEO Sitemap XML for Google Search Console


I just started using Frontity to improve UX/UI of my WordPress website as well as global performance, and I’m already astonished by the improvements I was able to achieve.

Like other small website owner out there I’m crazy about SEO, since it’s my main source of organic growth and here the problem.

I used to check search queries and other SEO related stuff using Google Search Console by submitting the sitemap generated with Yoast SEO, but I can’t understand how can I submit the same sitemap once I point the current Frontity deployment to the correct domain.

Here a small summary:


  • WP Core + Wordpress Front => andreaprovino.it
  • Sitemap => andreaprovino.it/sitemap.xml
  • Frontity Deploy: ml-blog.vercel.app


  • WP Core => server-andpro.it
  • Sitemap => andreaprovino.it/{???}
  • Frontity Deploy: andreaprovino.it

I was trying to simply add a route to my Frontity theme in order to redirect the traffic from andreaprovino.it/sitemap to server-andpro.it/sitemap.xml thus let Yoast SEO continue doing his job while keeping FrontEnd logic as basic as possible.

So there are two main problem:

  • can you suggest a better way to accomplish my goal?
  • otherwise, using my approach, can you tell me why is not working? (I’ve tried to add an handler for the route sitemap but once deployed it doesn’t work. You can check from the console.log data in ml-bog.vercel.app that the handler doesn’t mutate the state even if seem to be present, check window.frontity.libraries.source)

You can find general data for testing purposes down below:

After trying one more time, I was able to make it works. But I think it would be nice if you could consider my original question, in order to provide a better explanation for other people in the community.

I added a init function in index.js of the theme, at state.actions.theme:

  init: ({ libraries }) => {

    // Handle sitemap route.


But locally the route handling was working even without the initialization. How was it possibile?