I have two sites www.example.com
and m.example.com
. As it is shown, the latter is the mobile version of the first site. Basically each URL in the www.example.com
have a counterpart with same URL string with the mobile version, e.g. m.example.com/book/1
is the counterpart of www.example.com/book/1
.
The main site already has a sitemap www.example.com/sitemap.xml
.
My first question is, do I really need a sitemap for the mobile version and why?
And second, if I do need it, what is the best way to arrange the sitemap for both main site and mobile site version?
Should I put it in the main site's sitemap, e.g.
<!-- in http://www.example.com/sitemap.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0">
<!-- the URL for the main site -->
<url>
<loc>http://www.example.com/book/1</loc>
</url>
<!-- the URL for the mobile site -->
<url>
<loc>http://m.example.com/book/1</loc>
<mobile:mobile/>
</url>
</urlset>
Or should I put it in the separate file, e.g.
<!-- in http://www.example.com/sitemap.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0">
<!-- the URL for the main site -->
<url>
<loc>http://www.example.com/book/1</loc>
</url>
</urlset>
..
<!-- in http://m.example.com/sitemap.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0">
<!-- the URL for the mobile site -->
<url>
<loc>http://m.example.com/book/1</loc>
<mobile:mobile/>
</url>
</urlset>
Third, should (or should not) I use the same image sitemap tag for both main site version and mobile site version of the same URL?
e.g.
<!-- main site version -->
<url>
<loc>http://www.example.com/book/1</loc>
<image:image>
<image:loc>http://example.com/image.jpg</image:loc>
</image:image>
</url>
<!-- mobile site version either in same or different file -->
<url>
<loc>http://m.example.com/book/1</loc>
<mobile:mobile/>
<image:image>
<image:loc>http://example.com/image.jpg</image:loc>
</image:image>
</url>