The sitemap.xml file

  Instablog

Nearly all WordPress blogs are hosted on the Apache server. So much so in fact that WordPress plugins just assume that is the only server in town. They are right about 95% of the time, but InstaBlogs are hosted using the Nginx server. Why? Because it is way faster and more scalable. So why doesn’t everyone host on Nginx? Because it is marginally more work to setup and operate, plus there is some real work required to fully support WordPress.
One of those issues is the sitemap.xml file.
Wordpress plugins assume the server is configured to allow direct file system access to the WordPress install directory. That is a horrible idea no matter what server is being used, Apache or otherwise. We disallow it entirely, so there is NO plugin that will be able to write any system file, include not just sitemap.xml but robots.txt and .htaccess as well (see other help docs regarding those other files).
Moreover, the way plugins maintain the sitemap file is far from efficient, so what we do instead not only closes a massive security hole, and marginally improves performance as well.
Using direct access to each InstaBlog, we auto-generate a sitemap.xml file once daily. This operates on a fixed schedule and is not writable by WordPress. The advantages are known correctness; near-zero server load; and the ultimate in security.
The only downside is that the name of the sitemap file is not modifiable. It is named sitemap.xml, which is the default, and that name cannot be change.
So what should I do with Yoast and other plugins that expect to maintain sitemap.xml? Very simply, just don’t! But please also search these docs for other plugins that are ineffective, unneeded, and even a bit harmful for InstaBlog hosting.

LEAVE A COMMENT