We have multiple websites with different domains under single IIS endpoint. Each website has its own sitemap - sitemap1.xml and sitemap2.xml.

Can we implement rewrite rules so that www.example1.com/sitemap.xml will rewrite to www.example1.com/sitemap.xml and www.example2.com/sitemap2.xml?

  • I'm not sure I follow. Are you saying you want to rewrite one URL to two different things? Jun 28 '16 at 14:59

You could have it like this and just inform webmaster tools about the different affiliation.

  • /sitemap1.xml
  • /sitemap2.xml

Another option is to use a rewriting mechanism to rewrite calls to the corresponding sitemap file. Using .htaccess or IIS-rewrite.

  • domain1.com/sitemap.xml rewrites to /sitemap1.xml
  • domain2.com/sitemap.xml rewrites to /sitemap2.xml

IIS.net URL Rewrite
IIS rewrite Information

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.