How to create sitemap index file?


What can I do if my sitemap site contains links about 50,000 or about 10MB in size?
How can I get the search engine know if I have many sitemap files? These questions arise in mind.
The solution to the first question is very simple see- maximum size or link limit in XML sitemap.
Solution to second the second question is also simple. Create the sitemap index file which is similar to XML sitemap and can support maximum of 1000 sitemaps.

include following Tags or element:
1) <sitemapindex>
2) <sitemap>
3) <loc>
4) <lastmod>

Do's
Sitemap index must be in encoding UTF-8.

Don’ts
Do not create the index file of a sitemaps present on another domain.



this is how sitemap index file looks

Image of sitemap index file



Tags Explanation

<sitemapindex> must It's like a class which Encapsulates (act like a container)all information about sitemap tag.
<sitemap> must contains information about an individual tag and Its elements.
<loc> must It contains the location of sitemap, RSS or text File.
<lastmod> must Last modification date is not of the day index file or sitemap file created. It is the date of sitemap file last modified.