I have been setting up Magento E-commerce shop for a few of my clients. Many of them do both wholesale and retail with 2 separate domain names. Since Magento allowed us to setup multi-stores with one platform, one problem I came across was that I need different robots.txt and sitemap.xml set ups for each domain as search engines only looks for them at the root directory. So, I had to redirect these files depending on the domain at the nginx level so that search engine can get access to the correct file.

The following config will help you redirect/alias

location /filename {
        alias /path/to/the/file;


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.