URL has additional string -

Highlighted
Tourist
11 0 1

I am used to seeing additional strings on our product URLs when the product is out of stock - or for some reason, a duplicate product page was made, but I have never seen this one - ?_pos=2&_sid=0ce38240f&_ss=r.  Does anyone know why this is appearing and how to get rid of it? Thank you.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
710 44 119

Hi, @Karen14 


Elle here from Shopify!

 

I'm not sure why the string would be appearing but happy to look into this for you! If you can provide more details it will be very helpful. 


* What path are you taking to get to these URLs? (Does the string appear when simply going to your store and selecting a product?)

 

* Have you noticed any trends? Do only certain products display this string? 


* Can you provide some example URLs?

 

Thanks so much and looking forward to hearing from you!

 

Cheers,
Elle

Elle | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
Tourist
11 0 1

Hi Elle - yes there is a trend and it is something I just noticed last week with one product URL and I was able (unknowingly) to duplicate it a couple of minutes ago. If you are going through the website and click on a product the URL appears properly, but if you do a search for the product and click on any product that is appearing the string is added to the URL. So the position of the product appears in the string - ?_pos=3. I have tried this numerous times (I am doing some redirects and when searching for the products I want I was able to see this). Nothing has been changed on the backend of the website as far as I know - and I have not seen this before (and I do a number of redirects weekly and search to find the correct product & URL).

URL - https://www.canuckhomebrewsupply.com/products/flav-extract-peanut-butter

If you do a search for 'Peanut Butter' and then click on the product the URL is - https://www.canuckhomebrewsupply.com/products/flav-extract-peanut-butter?_pos=2&_sid=0ce38240f&_ss=r

 

URL - https://www.canuckhomebrewsupply.com/products/cp-tap-handle-finial

If you do a search for 'Finial' and then click on the product the URL is - https://www.canuckhomebrewsupply.com/products/cp-tap-handle-finial?_pos=3&_sid=2f334c4b9&_ss=r

 

Thanks for your assistance.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
710 44 119

Thank you for the additional context! 

 

The 'pos' part of the string is referring to the position the product appears in based on the search criteria. 

For example: When you search 'peanut butter', three products appear. The first one will display pos 1 in the string since it was displayed first, the second one will display pos 2 in the string since it is displayed second, so on and so forth. 

 

15-13-20808-m208u


This is expected behaviour across all stores and I do not believe there is a way to remove this from the URL. May I ask why you wish to remove it from the URL? Is this negatively impacting your store somehow? Please let me know!


Thanks so much,

Elle

Elle | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
Tourist
11 0 1
Hi Elle - Yes I knew why it was happening as I was able to duplicate it,
but I must say that this only started to happen Thurs. July 11, 2019. Never
before has the URL appeared this way when doing a search and then clicking
on the product. You or your tech team might ask 'How can she be sure that
is always hasn't been this way.' The reason I know it only started recently
is that when I do URL redirects I always search for the product, click on
it and then copy the entire URL after the /, and place it in the 'Redirect
to' box. I never have to remove any other part of the URL unless the
redirect is going to a product that is currently out of stock - then I have
to remove the ?variant=.

I may not be your typical Shopify user as I work in-house and I am able to
dedicate much of my work week to our website, so I would normally spend
about 20 hours a week editing, updating and adding new products. Spending
so much time on one website and recording what and where I do things makes
it easy for me to know what page, what I was doing and the date that I was
doing it.

To say it is negatively impacting our store, at this time I would say no
(however if the Googlebot happened to hit our store while the page with the
unusual URL string was open, then yes it could have a negative impact).

My biggest reason for wanting to get rid of the extra string in the URL is
for editing purposes. While it may not seem like a big deal to take an
extra second or two to grab a clean URL, when editing, redirecting and
checking stock the few extra seconds add up, and I hate wasting time. I see
absolutely no reason for the search position to be inserted into the URL,
it has no positive impact what so ever.

Thanks again - Karen
0 Likes
Highlighted
Shopify Partner
12 0 7

Hello @Elle here's how this is impacting my store for example.

 

Several days ago I noticed that on the search page our AJAX cart is no longer working. Looking into the code I found that the {{ product.url }} output has changed. AJAX pulls product variations directly on the Search page and it needs the URL of product.json so we need to call "/product/product-name?view=json" however when adding additional strings in front of that the js request it no longer valid.

 

So I need to either change the scripts on all my stores or find a different way to get the product.url without the additional strings.

 

If that behavior changes on any other product.url output I'm looking at major sitewide issues.

0 Likes
Highlighted
Shopify Partner
2294 116 353

 

 


@Karen14 wrote:
My biggest reason for wanting to get rid of the extra string in the URL is
for editing purposes. While it may not seem like a big deal to take an
extra second or two to grab a clean URL, when editing, redirecting and
checking stock the few extra seconds add up, and I hate wasting time.

Could you elaborate on this workflow and the why of frequent redirects?

to clarify are you searching for products in the admin or the frontend?

If your changing product handles redirects should be created automatically

If your using the frontend to make decisions about data|actions in the admin consider making a utility theme or templates to facilitate this workflow if apps are out of the question.

 

(however if the Googlebot happened to hit our store while the page with the
unusual URL string was open, then yes it could have a negative impact).

Such pages|urls shouldn't be indexed in properly setup themes

 


I see absolutely no reason for the search position to be inserted into the URL,
it has no positive impact what so ever.


Analytics yours or shopifys, and apps, and browser extensions.

 

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes
Highlighted
Tourist
11 0 1

Could you elaborate on this workflow and the why of frequent redirects?

-the reason for frequent redirects is that some products are discontinued, and in order to keep a good UX I always redirect the page to an appropriate page. I also keep a good eye on the Google Search Console and fix any 404s. As you are probably aware, Google keeps things in their index almost indefinitely. They are still finding URLs from previous CMS, so those old URLs need to be redirected to the proper pages.

 

To clarify are you searching for products in the admin or the frontend?

- I am searching for products from the front end. We sell numerous products that are similar to each other, so being able to look at the products that are on the website makes it easier to make sure that product pages we are redirecting go to the correct page.

 

I find that the additional string being added to the URL is not needed. We also use the search feature to find products for our customers when they are unsure of what they may need for their setup. We only want to send them the URL for the product, not a URL that contains where it was found on a search page.

0 Likes
Highlighted
Shopify Partner
2294 116 353

@Karen14 wrote:

Could you elaborate on this workflow and the why of frequent redirects?

-the reason for frequent redirects is that some products are discontinued, and in order to keep a good UX I always redirect the page to an appropriate page.


For future readers, if doing this make sure to check for backlinks for extra context when deciding where to redirect, 

and either:

A) avoid redirecting to other products that may themselves end up discontinued and have MORE redirects

B) methodically check redirects to avoid discontinued redirect chains that will build up over time.

 

 


@Karen14 wrote:

To clarify are you searching for products in the admin or the frontend?

 

I find that the additional string being added to the URL is not needed. We also use the search feature to find products for our customers when they are unsure of what they may need for their setup. We only want to send them the URL for the product, not a URL that contains where it was found on a search page.


If your doing work often using the front end you probably start wanting to build theme utilities for yourself that only show with a specific logged in customer or a separate theme used in preview mode.

 

Like making the 1 click button to copy only the url handle to your clipboard,

https://clipboardjs.com/ for clipboard shenaingans

Or generate the admin redirect https://help.shopify.com/en/api/reference/online-store/redirect#create-2019-04

Example using jquery

<button onclick='jQuery.post("/admin/api/2019-04/redirects.json","redirect%5Bpath%5D=%2Fproducts%2Fproduct1&redirect%5Btarget%5D=%2Fproducts%2Fproduct2")' />

 etc etc

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes
Highlighted
Shopify Staff
Shopify Staff
710 44 119

Hi, @Karen14 !

 

I can certainly appreciate how this is impacting your day to day workflow. 

@Georgi_Demirev, thank you for letting me know how this change has affected your store. Is the code within your theme something you added or was this built into the theme? 

 

I will be bringing all of these details back to our developers for consideration and I will share any updates I receive here! 

 

Cheers,
Elle

Elle | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes