Force Removal of Store Code ?___store=default from URL’s in Magento

Force Removal of Store Code ?___store=default from URL’s in Magento

July 4, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Force Removal of Store Code ?___store=default from URL’s in Magento

Removing Store Code Parameters from URLs in Magento

If you’re using multiple store views in your Magento installation, you may notice that a parameter like ___store=default or ___store=english appears in the URL when switching between views. While this is a default behavior for multistore configurations, it can be removed to provide cleaner, more SEO-friendly URLs.

Understanding the Default Behavior

Magento uses these store code parameters to determine which store view should handle each request. In your scenario, you have two store views—one for Arabic and one for English—and Magento is using the parameters to route traffic between them.

The parameter ___store=default refers to the default store view set up during installation, while ___store=english (or any other language code) represents a specific store view.

Removing Store Code Parameters

To remove these parameters from URLs, you’ll need to make some changes in Magento’s configuration and rewrite rules. Here’s a step-by-step guide:

  1. Configure the Default Store View

    Open your Magento admin panel and navigate to Stores > Settings > Configuration > General > Web. Under the Base URLs section, ensure that the default store view is configured correctly without any store code parameters.

  2. Disable URL Rewrite Generation for Store Views

    By default, Magento generates rewrite rules for each store view. To avoid this, you can disable it by adding a configuration setting in your app/etc/local.xml file:

    <reference name="core">
        <action method="disableModuleOutput"><module>Mage_Core_Store</module></action>
    </reference>
    

    This will prevent Magento from generating rewrite rules for each store view.

  3. Configure the .htaccess File

    Open your .htaccess file located in the public root of your Magento installation. Add or modify the following lines to ensure that URLs are rewritten correctly without any store code parameters:

    RewriteEngine On
    # Remove ?___store= parameter from URL's
    RewriteCond %{REQUEST_URI} !-f
    RewriteCond %{REQUEST_URI} !-d
    RewriteCond %{REQUEST_URI} !(index\.php$|[?.]php$) [NC]
    RewriteRule ^(.*) /index.php?url=$1 [L,QSA]
    

    This rule tells Apache to rewrite all URLs that don’t match an existing file or directory and send them through index.php, effectively removing the store code parameters.

  4. Clear Cache

    After making these changes, flush your Magento cache by navigating to System > Cache Management in the admin panel and clicking “Flush Cache Storage.”

Best Practices for Multistore URL Handling

While it’s possible to remove the store code parameters entirely, there are a few things to consider:

  • If you have more than two store views or complex URL structures, removing these parameters might lead to unexpected behavior. It’s always a good idea to test thoroughly after making any changes.

  • Magento uses the store code parameter internally for some tasks such as resolving product URLs in layered navigation and search results. Ensure that your customizations don’t break these functionalities.

  • If you’re using an SEO extension like Mageworx’s SEO Suite Ultimate or Amasty SEO, it might have its own settings for handling store views and URLs.

Conclusion

Removing the store code parameters from Magento URLs can help improve your site’s appearance, make URLs more user-friendly, and potentially enhance SEO performance. However, it requires careful configuration and testing to ensure that your entire site remains functional.

Remember that Magento’s default behavior is designed with multistore configurations in mind, so any changes should be approached with a clear understanding of the implications for your specific setup.

For more advanced URL handling techniques in Magento, I recommend checking out Laravel Company’s guide on Magento SEO best practices. It provides an excellent overview of how to optimize your URLs and improve organic search performance.

Admin Configuration SEO

Our network