: Where should I put the sitemap of mobile version of my site? 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
I have two sites 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 example.com have a counterpart with same URL string with the mobile version, e.g. m.example.com/book/1 is the counterpart of example.com/book/1.
The main site already has a sitemap 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 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 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 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>
More posts by @Kevin317
2 Comments
Sorted by latest first Latest Oldest Best
Not sure if you saw this. Here is a guide from Google describing tactics for your seperated mobile URL situation: Method for mobile with 2 URL's
Basically you set the desktop site as canonical, and mobile as alternate, then use tags to point bots to either-or mode using a preferred hierarchy.
Do almost the same for sitemap, only you can use rel and optional media queries. The media query defines which "version" of the mobile sitemap link to use. In the case of your image, i would include it in the canonical assets (to make it bubble into mobile too).
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>http://www.example.com/page-1/</loc>
<image:image>
<image:loc>http://example.com/image.jpg</image:loc>
</image:image>
<xhtml:link
rel="alternate"
media="only screen and (max-width: 640px)"
href="http://m.example.com/page-1" />
</url>
</urlset>
The guide to do this can be found by searching for "Google mobile site headers". Here is the original lander tutorial for all 3 styles of mobile.
Reply to question 1:
As the domains are different, in this case, one domain and one subdomain I suppose the sites are different too and therefore you should have one sitemap for your Desktop site and one for the Mobile version of it in the same way that you should add Google Webmaster code and verify both sites independently, thus allowing you to submit both sitemaps.
Question 2: As I said above, I would separate the files and link them as you showed.
Question 3: I think the image is irrelevant, but I would make them different, one for each version.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.