Local Community

Yoast SEO 14.0.4 sitemap.xml 404 on local

Sitemap XML 404 on local.
sitemap_index.xml is not working nor the child sitemaps.

Tried to disable the feature for sitemap and enable without success. Tried to reinstall Yoast SEO without success.

Tested on a real server, working as it should so it’s something either in Yoast latest 14.0.x or Local which isn’t making the plugins not playing nicely together.

https://yoast.com/help/my-sitemap-is-giving-a-404-error-what-should-i-do/ Maybe local could add rewrite support for yoast by default?

I use Local by Flywheel (v5.4.1+3311) and haven’t had a moment to look into why the rules aren’t working lately. They used to work but had to switch to localhost:port option because the domain.tld option wasn’t working.

That said, I fixed it (per site so not a great solution) by adding the NGINX rules (here) to the {Path_To_Local_WordPress}/conf/nginx/site.conf file.

It took a little trial and error but I found that it works when added between the WordPress and static rules, like so (screenshot):

	# WordPress Rules
    {{#unless site.multiSite}}
    include includes/wordpress-single.conf;
    include includes/wordpress-multi.conf;

<insert Yoast rules here>

	# Static file rules

If this doesn’t work, it does confirm that the Local environment does not have the correct rules which is why the parameter works but the pretty permalink doesn’t. Flywheel should be able to help you figure out where to put the rules in your setup. Hope this helps!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.