Why is this additional string appearing in my product URL and how can I remove it?

Topic summary

A Shopify store owner discovered unexpected URL parameters (?_pos=2&_sid=0ce38240f&_ss=r) appearing when products are accessed via search results, which began around July 11, 2019. The parameters track search position and session data.

Key Issues Identified:

  • Breaks AJAX cart functionality and ?view= liquid code implementations
  • Complicates workflow for URL redirects and customer communications
  • Creates unprofessional-looking URLs when sharing with customers
  • Potentially impacts SEO and Google Ads performance
  • One user reports 58,500 pages not indexed by Google

Shopify’s Response:
Support confirmed this is a permanent change intended to improve long-term search functionality and enable analytics. The update was added to the changelog after implementation, with no advance warning to merchants.

Community Solutions:

Liquid fix:

{% assign newproducturl = product.url | split: '?' %}
<a href="{{newproducturl[0]}}"

JavaScript fix (add to templates/product.liquid):
Removes _pos, _sid, and _ss parameters from URLs on product pages while preserving other parameters.

Current Status:
The discussion remains open with ongoing concerns about SEO impact and lack of merchant notification. Multiple users successfully implemented workarounds, though questions persist about potential negative effects of these solutions.

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Hi Karen. It’s quite possible it could be different for your theme, but for the one I was working on, it was in the following location:

/snippets/collection__thumb.liquid

Hi guys,

Thanks. I have a similar problem with my shopify store too - https://www.hellocircus.com/products/big-summer-diamond-wallpaper?_pos=2&_psq=big%20dia&_ss=e&_v=1.0

I am a small business owner and is doing everything by myself, so I am not an expert in web design. We sell wallpapers online which requires customers to provide me with the dimensions of their walls. I will respond based on the weblink. Hence, it will be easier if we can remove the extra words behind the URL to prevent any potential mix-ups

I am using the theme Symmetry and could not find

/snippets/collection__thumb.liquid

How do you find an alternative for this?

Thank you for all your help.

Warmest regards,

S

1 Like

@Singhui I wrote this little javascript function to remove these url parameters from your product page. This will leave the urls as is on the search page (in case Shopify does use the information for something), but will clean up the url when the product page is loaded.

Code:

<script>
(function () {
  var keys = ['_pos','_sid','_ss'];
  var deleteRegex = new RegExp(keys.join('=|') + '=')

  var params = location.search.slice(1).split('&')
  var search = []
  for (var i = 0; i < params.length; i++) if (deleteRegex.test(params[i]) === false) search.push(params[i])

  window.history.replaceState({}, document.title, location.pathname + (search.length ? '?' + search.join('&') : '') + location.hash)
})();
</script>

Add this code at the bottom of your templates/product.liquid theme file.

  • When did you first notice this change on your store with the way that your URLs are showing?
    A colleague of mine in Miami Florida actually brought this to my attention in July. It is affecting ALL PRODUCTS of 6 Brands catalog. Basically hundreds of products
  • How is this impacting your business/workflow/ads?
    I have been wondering why my google ads for the above mentioned brands are not effective and the reason is this URL issue is effective the SEO and the Google ads. THIS IS A HUGE problem!!

I have changed themes, it is still an issue, It is within Shopify - I enter the information in Shopify- I pay Shopify monthly, I expect a solution for this ASAP as if I cannot promote products successfully to sell then my business suffers immensely.

Sorry for the late reply, I retired on the 1st. of July and have neglected to check the email that is associated with this Shopify board. I first noticed this problem back in July 2019 and I did contact Shopify to let them know. They were not at all helpful and any of the ‘fixes’ that were given through this board did not help. I do hope you are able to find a solution to your problem so that you are not throwing money out the window on your Google Ads.

1 Like

Hi, we have added this to where you said to put it but now it shows a ‘?’ At the end of the URL. All we need to do now is remove the question mark.

I am running into the same problem and it is (I believe) greatly being penalized by Google at 58,500 not indexed pages.

We’ve gone in old store from 300-500 hits per day to maybe 50-100. For example

https://specialneedscomputers.ca/products/smartvision-3-smartphone?_pos=2&_sid=bf87f5ea8&_ss=r

Nobody seems able to help me. Help please.

I’m having this problem too. I’m using impulse theme. Is there a solution?

I’m having this problem too. I’m using impulse theme. Have you found a solution?

No, these extra characters are linked to Variants. Apparently, they are not picked by Google Search. They just look messy. Learn to live with them is the only solution. It has to do with GA4.

Which path should we follow? Can you explain in detail?

The problem was solved by using this code. Is there any harm in using this code?

Talk to your theme provider.

<script>
(function () {
  var keys = ['_pos','_sid','_ss'];
  var deleteRegex = new RegExp(keys.join('=|') + '=')

  var params = location.search.slice(1).split('&')
  var search = []
  for (var i = 0; i < params.length; i++) if (deleteRegex.test(params[i]) === false) search.push(params[i])

  window.history.replaceState({}, document.title, location.pathname + (search.length ? '?' + search.join('&') : '') + location.hash)
})();
</script>

The problem was solved by using this code. Is there any harm in using this code?

You can get rid of this additional string in your product url.

Here is the simple fix using a small code snippet:

  1. Go to store dashboard → edit code → theme.liquid

  2. Find <head tag in theme.liquid file and just in the next line paste below javascript code.