: Must the image url in a sitemap file begin with the same domain the file is stored on? I remember when making a sitemap, all URLs defined in between <loc> and </loc> must be part
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...
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 t.example.com/sitemap.xml
More posts by @Angela700
1 Comments
Sorted by latest first Latest Oldest Best
Yes you can includes images from different domains (such as when using CDNs) if both domains are verified in your Search Console (formally Web-master tools) account, or you include an entry for the xml sitemap file in the other domains robots.txt.
More info on Image sitemaps
This is similar to including entries for URLs that reside on a different domain, which you can also do if both sites are verified in Search Console.
Simplify multiple sitemap management
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.