Skip to content

Magento – Removing session id ?___SID=U from the URL

Today I rolled out a new Magento site and for the first time in almost 2 years of doing Magento development I had the session id appended to the url, namely: ?___SID=U

This was driving me mad and I didn’t want search engines to index the site with the “?___SID=U” in the URL, so I wanted to fix it asap.

Generally when I have a problem, there is usually someone else in the world who has had the same issue, so I searched the web and Magento forums for an answer. I couldn’t find any conclusive answers and seeing as though the Magento technical documentation is notoriously limited I had to find the solution myself.

So, here’s the simple solution:

  1. Go to System > Configuration > Web > Session Validation Settings
  2. Set Use SID on Frontend to “No”

Pretty simple, but I’m sure that it has caused frustration to a number of Magento developers out there so I hope that helps you dudes!

Tags: , , , .

22 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. I also encountered this problem, thanks for your sharing.

  2. vlad fratila said

    Thanks for sharing! This tip was helpful

  3. Try this solution if the above doesn’t work – App.php (mod)…

  4. Nice post real helpful to me thanks for the help

  5. Yes, these session ids are really very bad for SEO. Еhey create a lot of duplicate pages and we must get rid of them.

  6. Great tip thank you. Saved my magento site!

  7. Thanks for giving me the solution to my question

  8. Thanks for the sharing. i switched it off. I only saw this SID after the client made an conversion…

  9. Dima said


  10. Ankit said

    I did the configuration setting, but still sometimes magento appends SID=U to URL.s.

  11. Thanks for the help!

  12. siddharth said

    thanks for sharing

  13. Nayan said

    thanks for sharing this. you save many time of mine… thanks a lot…

  14. Matthijs said

    Wow, I spend quite some time figuring out why Magento adds “?___SID=U” to the URL. This post was very helpful! Thanks…

  15. Michael said

    After switching off the “SID in Frontend”, mac users where no longer able to order. Did anyone experience something like this before?

  16. Thank god for community and people like you sharing! I was going mad… as it worked for Payment Pro and stop for Hosted.

  17. We think we’ve encountered a problem whereby it needed to be set to Yes but this was for a slightly different problem. It was affecting the payment window crashing at the secure code

  18. It in Current Configuration Scope: Default config only.

  19. krishnendu sarkar said

    Thanks for your post..

  20. Thank you sooooooooo much for sharing this solved me a big problem.

  21. Great tip thank you. Nice post real helpful to me thanks for the help!

  22. Padma said

    Thank you ,so much.

Some HTML is OK


(required, but never shared)

or, reply to this post via trackback.