Multiple Sitemaps Within Single Sitemap File
I have a site with a sitemap, around 150 entries to URLs that are static on the site.
lastmod element is set to 2012. This sitemap was updated approximately a year ago.
The last couple of lines of this SM file are:
<url><loc>http://example.com/sitemap2.xml</loc><changefreq>daily</changefreq></url> <url><loc>http://example.com/siteMap3.xml</loc><changefreq>daily</changefreq></url> </urlset>
Sitemap 2 contains the same logic but with links targetting specific products and sitemap 3 does the same but aimed towards categories. These two are generated daily.
sitemap.xml is registered. An external SEO advisor ran a test and advised the sitemap is not updated and does not list the links for products and categories.
How could I check if what he has said is correct? If he is correct what could I have done wrong here?
Having multiple sitemaps is fine, but you should link them from a sitemap index file.
For your case, you could use something like this:
<?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>http://example.com/sitemap1.xml</loc> <lastmod>2012</lastmod> </sitemap> <sitemap> <loc>http://example.com/sitemap2.xml</loc> <lastmod>2016-10-11</lastmod> </sitemap> <sitemap> <loc>http://example.com/sitemap3.xml</loc> <lastmod>2016-10-11</lastmod> </sitemap> </sitemapindex>
changefreq, you have to use
lastmod, which takes the date of the last modification of the sitemap (not of the sitemap entries).
This sitemap index file can then be linked in your robots.txt (and/or be submitted to search engines).
- → How do I call the value from another backed page form and use it on a component in OctoberCms
- → Inline JS callback syntax Vs Internal JS callback syntax
- → Prevent form action from being followed by robots
- → How to remove parameters from the root URL if it does I18n
- → SEO Canonical URL in Greek characters
- → Htaccess negation
- → Wrapping anchor elements with text
- → Adding schema.org to site
- → dynamic php title depends on page id and using of "if (isset"
- → Building sitemap for 2 wordpress install under 1 domain
- → Bigcommerce Repeating url
- → 301 Redirection from no-www to www in wordpress
- → Wrapper inside or outside HTML5 semantics main, which is best practice?