Viewing 4 replies - 1 through 4 (of 4 total)
  • Did you figure this out?

    I got the same problem

    is there a solution to this?

    I got the same problem with Google Webmaster Tools returning 24 errors in total >
    General HTTP error: HTTP 403 error (Forbidden)

    Here’s a solution – someone else was having the issue with another sitemap plugin. I was having the same issue despite the sitemap ‘page’ being visible when the URL was typed in – it was still giving a 403 response header to visitors inc. Google.

    Put this in the WordPress .htaccess:

    # Yoast SEO - XML Sitemap 403 Fix
    <Files "sitemap_index.xml">
    	allow from all
    </Files>
    # END Yoast SEO - XML Sitemap 403 Fix

    Hope it works!

    Should say you’ll need to add rules for any ‘sub’ sitemaps as well like page-sitemap.xml or add a general rule like:

    # Yoast SEO - XML Sitemap 403 Fix
    <FilesMatch "(sitemap_index.xml|page-sitemap.xml|post-sitemap.xml)">
    	allow from all
    </FilesMatch>
    # END Yoast SEO - XML Sitemap 403 Fix

    Add each sitemap separated by a ‘pipe’ character.

    Still not exactly sure why it’s happening. I am using a shared host and they say ModSec is being triggered. They removed the ModSec rule that was being triggered but it didn’t help, only the above .htaccess addition did.

    Maybe I’m being dumb somewhere, it’s late here!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Sitemap error 403’ is closed to new replies.