Protect your WordPress sitemap from public access without hurting SEO.
Hide WP Sitemap for Users allows you to block normal visitors from viewing wp-sitemap.xml and all its sub-sitemaps, while still allowing search engines, crawlers, and cache preload bots to access them normally.
Perfect for site owners who want more privacy, security, and control over their site structure.
What This Plugin Does
Hides wp-sitemap.xml from regular visitors
Allows Google, Bing, and other search engine bots
Works with cache plugin preload bots
Keeps SEO fully intact
Lightweight, no settings required
Prevents sitemap snooping and structure exposure
By default, WordPress exposes your sitemap to everyone. This can:
Reveal your website structure
Expose hidden or sensitive URLs
Help scrapers and competitors analyze your content
This plugin fixes that by blocking human visitors while allowing trusted bots.
How to Test the Plugin
Open a private or incognito browser window
Visit:
https://yourdomain.com/wp-sitemap.xml
Also test sub-sitemaps, for example:
/wp-sitemap-posts-post-1.xml/wp-sitemap-pages-1.xml
Expected result:
You should see a 404 page. The sitemap XML should not be visible.