WordPress.org

Forums

Yoast SEO
[Plugin: WordPress SEO by Yoast] Sitemap error 403 (5 posts)

  1. Ginioh
    Member
    Posted 2 years ago #

    Hi,
    I got an error with the sitemap option in this plugin, but I don't think the plugin is the problem.
    Everytime I test the sitemap_index.xml on Google, I get a 403 html error.
    I tried google xml sitemap, strictly sitemap, disabling plugins, modify htaccess, ecc... but nothing works.

    Can you give me the solution to this problem? I wasted over a week to resolve this.

    The sitemap is here:
    http://www.focusport.it/sitemap_index.xml

    Thanks!

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. jklupfel
    Member
    Posted 2 years ago #

    Did you figure this out?

    I got the same problem

  3. Bill Karkavos
    Member
    Posted 2 years ago #

    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)

  4. kaepora
    Member
    Posted 1 year ago #

    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!

  5. kaepora
    Member
    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic