Setting the sitemap status where WordPress sets it
How I made the verusapp.co.uk sitemap answer correctly for search engines, by setting its status at the point WordPress does.
What I tried
The Verus website publishes a WordPress sitemap for search engines. A plugin was sending it out with a status that did not match the page.
Why I chose differently
WordPress finishes sitemaps early in a request, so any correction has to happen at the moment it sets the status.
What I chose
I set the status there. Every sitemap address now answers correctly, every page is listed and a nonsense address still returns a real not found.
The principle
Check the status code, not just the page. When a fix appears to do nothing, first check whether it ran.
- WordPress
- XML sitemaps
- Technical SEO
- HTTP status codes