Whenever I open my website it opens with an unwanted URL like


It should open like


Why this type of URL is coming. And when I clear cache, then site opens with normal url, but after some time same problem. Please tell me permanent solution of this problem. Thanks


2 Answers 2


Please follow this link, you can remove that from admin panel on follwing path.

Go to the Store > Configuration > General > Web > Session Validation Settings > Use SID on Storefront and set its value to No

The SID is a "session ID". Magento uses this to track a user's activity within the same Magento installation. Normally, Magento powers one website and one store from one installation (database).

Magento could power multiple websites with multiple stores from one installation though. The SID allows users to stay logged in while navigating across these websites/stores.

I think if you have the function enabled, the SID is sent when accessing catalog URLs so Magento can update the session with the user's location/state for the current website/store.

If you're not running a multi-website or multi-store environment, it's safe to disable the SID on the frontend.

enter image description here

  • if i set it to No then will it not effect to my site, i mean any problems with my site..?? Commented Nov 7, 2017 at 5:18
  • no it will not affect your site
    – Yogesh
    Commented Nov 7, 2017 at 5:23
  • sure.. i will definitely do this if once my problem get solved.. Commented Nov 7, 2017 at 5:27
  • it still coming Commented Nov 7, 2017 at 7:18
  • Flush caches try again and test in private browser or remove browser caches also.
    – Yogesh
    Commented Nov 7, 2017 at 8:03

I was facing same issue in Magento-2.1.9 and setting Use SID on Storefront to No doesn't work for me because I have set "Auto-redirect to Base URL" to "Yes".
I have resolved the issue by doing following.
If you are using single store mode, then copy file vendor/magento/framework/Session/SidResolver.php to lib/internal/Magento/Framework/Session/S idResolver.php and change protected $_useSessionInUrl to false

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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