leicester web designer blog

Closing Down - No Sale!

Fresh Web Services is closing down, effective 31/12/2019.

We'd like to thank all our customers for placing their trust in us & we hope that trust has been repaid.

Sitemaps are an important way to tell search engines such as Google about your website. If the search engine knows your site has a sitemap, it will examine the sitemap as part of its crawl of your website. Your sitemap can also make suggestions to Google that certain pages should be crawled more often or are more important than others. When you add new pages or products to your shop, your sitemap should be regenerated so that the spider picks up these changes as quickly as possible.

Which sitemap is master?

By convention, your sitemaps live at the root of your webspace and are accessed like so: http://www.yourwebsite.co.uk/sitemap.xml. This, however, presents you with a problem if you are running a multi domain Magento installation. Suppose you have 3 different domains served by the same Magento installation: shop1.com, shop2.com and shop3.com and that you setup shop1.com as your first Magento website. The problem is that Magento uses the .htaccess file to redirect different domains to the correct website within Magento. So, using shop2.com/sitemap.xml will return the sitemap of shop1.com, since this was the first website that you set up within Magento.

Subfolders for each domain

One way to resolve this is to create a folder called sitemaps under root. Then create subfolders for each shop under sitemaps - so you would have root/sitemaps/shop1, root/sitemaps/shop2, etc. Then within Magento, when you add a sitemap for each you reference the correct folder for each site

. Add new Magento sitemap

When you have multi domains served by the one Magento installation, you then have something like the following situation in your list of sitemaps within Magento.

sitemaps in Magento

 It is important to remember that your sitemap is no longer in the root of your server. Rather, you would reference your sitemap like so: shop2.com/sitemaps/shop2/sitemap.xml, shop3.com/sitemaps/shop3/sitemap.xml

Alternative Methods

One approach is to use Apache Rewrites in .htaccess which you can see here, or symlinking which was explained in this article (http://www.ekgmarketing.com/multiple-magento-storefronts-using-different-sitemaps-with-different-domains/) that is no longer available. Both these methods are for those with more advanced Apache or Linux skills.

Satisfied Clients

Fresh Web Services Ltd:
LCB Depot, 31 Rutland Street, Leicester. LE1 1RE
Phone: +44 (0)116 279 3822
Company No: 04716234
52.634568, -1.127919
Use of this website constitutes acceptance of the
Fresh Web Services Terms and Privacy Policy including cookie-use