Mobile app version of vmapp.org
Login or Join
Angela700

: 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

@Angela700

Posted in: #Html #Images #Sitemap #Url #XmlSitemap

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

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Angela700

1 Comments

Sorted by latest first Latest Oldest Best

 

@Tiffany637

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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme