Skip to:

tags.php generates a 302 header – Google doesn’t like redirects in the sitemap

  • chrishajer


    I was checking my Google sitemap stats and saw this recently for my bbPress sitemap:

    URLs not followed

    When we tested a sample of the URLs from your

    Sitemap, we found that some URLs were not accessible

    to Googlebot because they contained too many redirects.

    Please change the URLs in your Sitemap that redirect

    and replace them with the destination URL (the redirect

    target). All valid URLs will still be submitted.

    Further reading led to this:

    So my questions are:

    1. What is the reason this is a 302 header (temporary redirect) vs a 301 header (permanent redirect)?

    2. Can it be changed in the code or with a plugin to generate a 301 header so Google will follow the URLs?

    3. If this is not possible, what would the proper permanent URL be for a tag URL like

    BTW, I am using the Sitemap plugin for bbPress by Richard Boakes.

    I can modify that to write the proper permanent URLs to the sitemap if that’s the easiest way to go about it. Or, maybe tags URLs should not even be in the sitemap (they are just pointers to content that exists elsewhere anyway.)


Viewing 4 replies - 1 through 4 (of 4 total)

  • _ck_


    I am not sure why Google would be seeing redirects. bbPress only redirects after form submits via wp_redirect to the best of my knowledge. Some plugins do too, but usually again after only form submits. Even tag URLs don’t use redirects.

    Are you saying the sitemap plugin does not generate permalink urls but rather the non-slug type ie. ?topic=123 If so, it’s outdated and if you are using slugs it should be modified to generate results that take advantage of slugs.



    Here’s an example of a URL in the sitemap.

    If you do a

    curl -I you get a 302 header back. If you URL unencode the URL and do a curl -I, you get back a proper 200:

    curl -I ""

    I am not using permalinks or slugs, and that plugin author doesn’t seem to have updated it since I installed it long ago. I actually turned it off a while ago because of the amount of time it was taking to generate the sitemap for 5000 posts.

    So, I guess the question is, why does that first URL trigger a 302? Maybe the sitemap plugin is creating URLs that are poorly formed?



    Sorry, I forgot I was talking about tags.php specifically. Here’s a tags URL.

    is what’s in the sitemap.

    curl -I ""

    returns a 302 header.

    If you unencode it, and then curl -I:

    curl -I ""

    returns a 200 header.

    Maybe it’s just the urlencoding of the = that causes it to redirect? That’s the only difference between the two URLs here.

    Sam Bauers


    It’s definitely the URL encoding causing the CURL issues.

    I don’t know enough about the plugin to comment on it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar