I remember when making a sitemap, all URLs defined in between <loc>
and </loc>
must be part of the same domain as the domain the file is stored on. For example, I can use this line in my sitemap...
http://an.example.com/abc.html
...Only if the sitemap is stored on and publicly accessible from the folder mapped to the an.example.com
domain.
But that entry above won't work if the sitemap is stored on a folder representing a different domain such as y.example.com
or even domain.com
.
My question is, should I use the above thinking when trying to index for Google images? For example, do image URLs defined in <image:loc>
and </image:loc>
have to contain the same domain as the location of the sitemap file the entries are contained in?
The reason why I ask is because I have two subdomains. Let's call them t.example.com
and i.example.com
. T is for text, and I is for images.
My site map for one page currently would look like something as follows:
<url>
<loc>http://t.example.com/page-one.html</loc>
<image:image>
<image:loc>http://i.example.com/image-one</image:loc>
<image:title>Some image</image:title>
</image:image>
</url>
Am I wrong with using a different subdomain to reference the image? Assume the sitemap file is stored and accessed at http://t.example.com/sitemap.xml
<loc>
so now google says I submitted thousands of pages and thousands of images, but the links in<image:loc>
are duplicates of<loc>
just to conform to all specs. good luck me.