[wp-trac] [WordPress Trac] #58379: Can't disable the default wordpress xml sitemap
WordPress Trac
noreply at wordpress.org
Wed May 24 11:23:42 UTC 2023
#58379: Can't disable the default wordpress xml sitemap
--------------------------+------------------------------
Reporter: ema15 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Sitemaps | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by ema15):
Hi,
I tried many solutions, but nothing work. I tried to deny all users except
googlebot from access wp-sitemap ofr testing, but the sitemap is alwayes
accessible. Here is the code I added to .htaccess file:
{{{
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !googlebot$ [NC]
RewriteRule ^wp-sitemap\.xml - [F,L]
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58379#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list