4

I've tried most of the solutions to remove "?___store=default" from magento URL but no success.

that makes duplicates for every page on magento (1.9.4) site that effecting SEO.

is there a working solution for this issue?

  • Magento 1.9.4 is not out yet. Do you mean Magento 1.9.2.4? – toon81 Apr 17 '18 at 11:40
2

In System -> Configuration -> Web -> URL Options the first item is 'Add Shop Code to URLs'. That will be set to 'No' by default. Of course, anyone seeing this will assume that having that set to 'No' means that the '?___store=' part shouldn't be appended to the url, but the opposite is the case. That parameter is used by Magento to display the correct store because it’s set to 'No', not in spite of it.

  • You should mention that setting this configuration to "Yes" results in URLs like example.com/de where de is the store code (i.e. the store code is always part of the base url). It's true that as a side effect it also removes the ___store parameter because it is not necessary anymore. – Fabian Schmengler Jul 25 '16 at 18:48
  • I'm using a single store so why is that required? also when I enabled that option my site return 404 error – Ahmad Darwish Jul 25 '16 at 18:54
2

The parameter is necessary if multiple store views have the same base URL because to distinguish on what store view you are, a cookie must be used. This cookie is set based on the ___store URL parameter.

If your store views have different base URLs (like different domains or subdirectories, also possible with the configuration Add Store Code To URLs), you could try to set up a 301 redirect using .htaccess that redirects these URLs to the same URL without ___store parameter.

But there is a caveat: you absolutely need the __from_store parameter if you use different URL keys in different store views. It is used to look up the URL path in this store to find the product or category, then redirect to the URL in the selected store. On product and category pages, this is not a SEO issue, because of the redirect, but on other pages it does nothing and if you remove ___from_store from all URLs, the redirect won't work anymore.

An alternative is to implement what Magento Enterprise does out of the box (I can't give code details for obvious reasons):

A predispatch observer that looks for the ___store and ___from_store parameters, figures out what's the right URL and redirects while setting the store cookie.

1

You don't need to do anything about such URL. Instead, you login your Google Webmaster and go to the section "URL parameters". In this section you can add the ?___store parameter and let Google know that it doesn't affect page content.

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.