Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested indexing This Sitemap Index is referenced by another Sitemap Index. #70

Closed
wildjcrt opened this issue Apr 2, 2012 · 7 comments
Closed

Comments

@wildjcrt
Copy link

wildjcrt commented Apr 2, 2012

I use this gem on my site to create sitemap files for search engine.
In google webmaster tools hint me that "Nested indexing This Sitemap Index is referenced by another Sitemap Index."

I see README providing example:

  • public/sitemap_index.xml.gz

    <?xml version="1.0" encoding="UTF-8"?>
    <sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd">
      <sitemap>
        <loc>http://www.example.com/sitemap1.xml.gz</loc>
      </sitemap>
    </sitemapindex>
    
  • public/sitemap1.xml.gz

    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1" xmlns:geo="http://www.google.com/geo/schemas/sitemap/1.0" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
      <url>
        <loc>http://www.example.com/</loc>
        <lastmod>2011-05-21T00:03:38+00:00</lastmod>
        <changefreq>always</changefreq>
        <priority>1.0</priority>
      </url>
      <url>
        <loc>http://www.example.com/sitemap_index.xml.gz</loc>
        <lastmod>2011-05-21T00:03:38+00:00</lastmod>
        <changefreq>always</changefreq>
        <priority>1.0</priority>
      </url>
      <url>
        <loc>http://www.example.com/welcome</loc>
        <lastmod>2011-05-21T00:03:38+00:00</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.5</priority>
      </url>
    </urlset>
    

But Sitemap errors - Webmaster Tools Help also answer for "Incorrect Sitemap index format: Nested Sitemap indexes" needing to remove entries pointing other Sitemap index files.

I find the sitemap1.xml having the Sitemap indexes entry line.
How to solve this sitemap error ?

@kjvarga
Copy link
Owner

kjvarga commented Apr 3, 2012

Hi there,

That's the first report I've had that this is not a good practice. So I would consider turning it off by default if that is in fact the case. You can turn it off with:

SitemapGenerator::Sitemap.include_index = false

Can you try that and then confirm that after that change Google reports no sitemap errors?

@wildjcrt
Copy link
Author

wildjcrt commented Apr 3, 2012

Thanks for your answer. I refresh my sitemap complete, and I'll observe the google webmaster tools report.

@wildjcrt
Copy link
Author

wildjcrt commented Apr 9, 2012

Hi kjvarga

The google webmaster tools' index error has disappeared. Nice!
Close issue.

@wildjcrt wildjcrt closed this as completed Apr 9, 2012
@kjvarga kjvarga reopened this Apr 9, 2012
@kjvarga
Copy link
Owner

kjvarga commented Apr 9, 2012

Thanks for confirming that! But hold on. I'm going to leave the issue open till I make this the new default.

@kjvarga
Copy link
Owner

kjvarga commented Aug 9, 2012

Ok as of v3.2 this is the new default. I had a feeling the include_root and include_index options where going to be more trouble than they were worth, but once it was out I didn't want to mess with it.

@9mm
Copy link

9mm commented Aug 10, 2012

sorry could you clarify what this does? does this mean when it generates a sitemap it doesnt include the root url?

@kjvarga
Copy link
Owner

kjvarga commented Aug 10, 2012

No it will still include the root URL, but not the sitemap index URL.
include_root still defaults to true
On Aug 10, 2012 8:59 AM, "Travis" notifications@github.com wrote:

sorry could you clarify what this does? does this mean when it generates a
sitemap it doesnt include the root url?


Reply to this email directly or view it on GitHubhttps://github.com//issues/70#issuecomment-7648774.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants