If robots.txt points to a sitemap in a sub-folder, can the sitemap specify URLs in the root?

Suppose I have a robots.txt file in my root, http://domain.com/robots.txt, that specifies a sitemap in a sub-folder that has a single declaration that points to a sitemap index:

robots.txt

Sitemap: http://domain.com/sub/sitemap_index.xml

Suppose also that the sitemap index points to a sitemap.xml that same the sub-directory:

sitemap_index.xml

 <?xml version="1.0" encoding="UTF-8"?>
 <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <sitemap>
       <loc>http://domain.com/sub/sitemap-1.xml</loc>
    </sitemap>
 </sitemapindex>

In the sitemap specification, it clearly states that the sitemap can only specifies URLs in the current folder or sub-folders. However, does this change in the scenario I described above? The reason I ask is that I know that a robots.txt file can point to sitemap hosted on a completely different domain. If this is possible, then it stands to reason that a sitemap in a subfolder, but pointed to from robots.txt in the root, can specify URLs in the root and all sub-folders from there.

Anyone know for certain?

Answers


yes it will change in the scenario you mentioned above. In the above scenario your Robot.txt can point to the same domain url's from any directory either sub or main.


Need Your Help

Android post JSON to web service php and recieving JSON from service

php android json post

Im trying to write a login service in the android by sending JSON to the web service i have in PHP after its processed in the web service JSON is returned back. My problem is sending JSON and then

Chrome Extension that copies image URL on click

google-chrome-extension

I'm brand new to making Chrome Extensions and have done the simple tutorials, but I'm having trouble finding what I need. I want the extension to allow a user to chose an image on a webpage, and then

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.