title: Google sitemap index - sitemap location with parameters
body: <p>Im about to create a tool to create dynamic sitemap's for google (and generate a dynamic sitemap index page aswell).</p>
  
  <p>But i can't find any information about how the URL in the sitemap index has to be. I know it doesnt have to end on .xml. but can the sitemap location in a sitemap index look like this?</p>
  
  <pre><code>&lt;sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"&gt;
  
    &lt;sitemap&gt;
  
      &lt;loc&gt;http://www.example.com/sitemap1.xml?param1=someParameter&amp;param2=anotherParameter&lt;/loc&gt;
  
      &lt;lastmod&gt;2004-10-01T18:23:17+00:00&lt;/lastmod&gt;
  
    &lt;/sitemap&gt;
  
  &lt;/sitemapindex&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Update:</strong>
  We went with the following solution.</p>
  
  <pre><code>&lt;sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"&gt;
     &lt;sitemap&gt;
        &lt;loc&gt;http://myhost.com/sitemap1.xml&lt;/loc&gt;
        &lt;lastmod&gt;2015-01-28&lt;/lastmod&gt;
     &lt;/sitemap&gt;
     &lt;sitemap&gt;
        &lt;loc&gt;http://myhost.com/sitemap2.xml&lt;/loc&gt;
        &lt;lastmod&gt;2015-01-29&lt;/lastmod&gt;
     &lt;/sitemap&gt;
  &lt;/sitemapindex&gt;
  </code></pre>
  
  <p>Google seems to be pretty happy about it. At least it works, and google doesnt complain about it. You could probably add more attributes (if they are specified in the sitemaps.org schemas) but how much of a difference it will do, i do not know.</p>