Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a bi-lingual website with a sitemap index for each language that links to several different sitemaps (one for videos, one for static content, and one for articles). I would like to introduce another sitemap that links the sitemap indexes, so I could link that sitemap in the robots.txt in the root and wouldn't have to have one robots.txt for each language.

Is that valid? Or is there a simpler solution to my problem?

share|improve this question

3 Answers 3

up vote 5 down vote accepted

I'm not sure if this changed over the years since this was asked; while in theory you can (as the first answer states), in practice Google at least will give you an error (as seen in their Webmaster Tools):

Incorrect Sitemap index format: Nested Sitemap indexes

The Google help page further states:

A sitemap index file can't list other sitemap index files, but only sitemap files.

Source: https://support.google.com/webmasters/answer/35738

share|improve this answer
    
The important thing is sitemap vs sitemap index. I've made this error in the past. An index contains multiple sitemaps - that is the only way one of these types can contain another sitemap/index file. The documentation could be clearer imho. –  winwaed Feb 17 at 14:41

Yes, you can have a sitemap index containing references to other sitemap indexes [source], as long as they're all on the same domain.

Each individual sitemap index can include up to 1,000 references to another <sitemap>. If you need to reference more than that, create multiple sitemap indexes and submit each one.

Each individual sitemap can include up to 50,000 page references. If you need more than that, split them across multiple sitemaps.

share|improve this answer

There is an easier way but only if your web hosting package allows it.

Why not create subdomains for each language?

Each subdomain can then be pointed to a separate folder then basically, you copy everything so both folders are identical, then you change the contents of the newly presentation pages (for example, index.html) to match the different language.

For example, if you have a setup like this:

URL: http://www.example.com

Document root of above URL: /home/user/public_html

Contents of document root:

index.html
index.css
sitemap.xml
robots.txt

Then you can plan a setup like this:

URL: http://fr.example.com

Document root of above URL: /home/user/french/public_html

Contents of document root:

index.html
index.css
sitemap.xml
robots.txt

Then you'd only change index.html.

BUT...

If you used absolute pathnames in some of your scripts, then you need to change those as well. so in the above example, if the copy of index.html refers to index.css in the original folder, then that needs to be updated.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.