SEO, AdWords, affiliates, advertising, and promotions
Hi all,
I noticed some weird url starting with "pr_prod_strat=collection_fallback" and ending with "&pr_seq=uniform" appearing on my google search consol to be indexed.
I searched on google and found out other stores had similar pages.
Can someone explain to me what is going on??
This creates more than 1k pages for google to crawl while my website only has 100+ pages...
I am very curious about what is causing this and would like to get more information about it!
Any hint is welcomed,
Cheers
Solved! Go to the solution
This is an accepted solution.
Hi @Bigjjjim ,
As far as I know this is the url for the product recommendation. The url are added as a code parameters.
This is an accepted solution.
Hi @Bigjjjim ,
As far as I know this is the url for the product recommendation. The url are added as a code parameters.
Is it automatically added in some theme (like venture for example)?
I am curious because I have not implemented any recommendation system on my site yet.
Thank you for your response!
It usually appears below the product page. It depends on the theme
Hi
It can be a normal behavior but it is a very bad behavior for SEO. The templetes developers shoud think in it before to develop a theme.
Any idea how to fix it?
Thanks
Hello, there
I have had the same problem as you recently. I have read the solution you marked but it didn't help me. Could you please elaborate on how to fix this issue? Because these massive new URLs appear as a problem for me.
Thank you so much!
Hi @Chawww,
Nothing to fix since it is a normal behavior. The links are passing parameters for recommendation
Hi Made4Uo, our store has the same problem.
But I'm thinking about adding a section of codes in the robots.txt file to tell search engines not to crawl these URLs that contain "pr_prod_strat=collection_fallback" and "&pr_seq=uniform".
If this is feasible, then what exactly the codes should be? - Is it "Disallow: /products/ *?pr_prod_strat=*pr_seq=uniform"?
Hi @fanwer
I think you need first to do noindex that URLs in theme.liquid with code like;
{% if handle contains 'seq=uniform' %}
<meta name="robots" content="noindex">
{% endif %}
Hi @frankymartin,
I've added the said code snippets in theme.liquid file.
However, this problem continues. Really don't know how to solve this problem.
Check the screenshot here as an example.
Hi @fanwer
After do NOINDEX you can block that URLs in robots.txt and you can ask to delete that URLs in Google Search Console.
Hello frankymartin,
I have the same problem. I add the code with noindex on theme.liquid. How can i block that url in robots.txt? i gess the code should start with {{- 'Disallow: ... but dont know wich code to add ex
actly. can you help me?
Hi, should be something like;
{%- if group.user_agent.value == '*' -%}
{{ 'Disallow: /products/*?pr=*' }}
{%- endif -%}
Thant you franky martin but Sorry i guess i was not clear. i i wanted the code to add in robots.txt not in the shopify theme !
concerning the code you ask me to add, i arleay add the code you suggested to @fanwer
{% if handle contains 'seq=uniform' %}
<meta name="robots" content="noindex">
{% endif %}
So do we have to add both code? and other instructions on robots.txt?
I come here to update the piece of code here, and it turned out that it worked. See the screenshot from GSC.
The code that I inserted into the end of theme.liquid file is -
{%- if canonical_url="*seq=uniform" -%}
<meta name="robots" content="noindex, nofollow">
{%- endif -%}
Great!! So, the codes to insert are:
In theme.liquid (to do noindex):
{%- if canonical_url="*seq=uniform" -%}
<meta name="robots" content="noindex, nofollow">
{%- endif -%}
{% if handle contains 'seq=uniform' %}
<meta name="robots" content="noindex, nofollow">
{% endif %}
In robots.txt (to block crawler):
{%- if group.user_agent.value == '*' -%}
{{ 'Disallow: /products/*?pr=*' }}
{%- endif -%}
@frankymartin Solution with noindex will not work because you can't get url params with liquid
Hey Franky,
Thanks for all the info, just to be clear, all 3 of these codes are to be added to themes.liquid, right?
and not in Robots.txt file.
I add 6 months ago the advice of frankymartin. But i still have this url in 404. did you find a solution that works to eleminate that url from search console finally?
okey i understand how can i put exactly in shopify store i mean where place if i put code another code the same
thank u
Hello!, And thank you for the answer.
Can I ask you where it is supposed to go within the theme.liquid file.
I'm a little bit lost, and I don't know exactly where to place this piece of code inside of the theme.liquid file.
Thank you
@frankymartin @fanwer @Alexis_Théry @Wooki @DariusWS
Here is an example string that is at the end of my product URLs:
?pr_prod_strat=use_description&pr_rec_id=f50a47009&pr_rec_pid=4703513280571&pr_ref_pid=4703091556411&pr_seq=uniform
I just tried adding the code below to my theme.liquid file:
{% if handle contains 'seq=uniform' %}
<meta name="robots" content="noindex, nofollow">
{% endif %}
{%- if canonical_url="*seq=uniform" -%}
<meta name="robots" content="noindex, nofollow">
{%- endif -%}
And adding the code below to my robots.txt file:
{%- if group.user_agent.value == '*' -%}
{{ 'Disallow: /products/*?pr_prod_strat=*' }}
{%- endif -%}
The code placement is shown in the attached screenshots below. Can you please confirm if this should or should not fix the issue?
and is this work for you. if not, did you solve it?
Hello 🙂 How about to put all this links in "nofollow" ? I have already blocked these url's but are still detected by GSC so that the internal links are in dofollow. How can I fix this? Thankyou!
@Josep97 @klaasmondria Here is another article with more detail: https://community.shopify.com/c/technical-q-a/unwanted-urls-being-indexed/m-p/2490293#M153619
Hi @Bigjjjim
I solved my problem with change {{ product.url }} to {{ product.url | split: "?" | first }}
I found it in my product-card.liquid file.
I change :
<div class="card-wrapper">
<a href="{{ card_product.url | default: '#' }}" class="full-unstyled-link">
<span class="visually-hidden">{{ card_product.title | escape }}</span>
</a>
By :
<div class="card-wrapper">
<a href="{{ card_product.url | default: '#' | split: "?" | first }}" class="full-unstyled-link">
<span class="visually-hidden">{{ card_product.title | escape }}</span>
</a>
My problem is solved
Hope this help you
HI @Bigjjjim @wooki
Its great for you if you solved the problem . So this url are not anymore indexate by google?
All the solution i tried from here didnt worked.
I had a look on my theme (SPLIT) and didnt find any liquid template called product-card.liquid.
I have a product.liquid file but not the code you are talking about.
Any idea how to solved that in other theme than yours?
Thanks!
Hi @Alexis_Théry
I just make it online, then my URL are always indexed.
But they are no longer available in my internal link and Google can't found new one. What is most important to avoid generating new ones each time we add a new product
Then, you must:
- Have a canonical tag that links to the main URL product at all times
- Above all, do not have a directive in robots.txt. Otherwise, Google cannot take the canonical into account since it is told not to view these pages.
- be patient 😄 I ll wait 1 weeks to see the result on my SearchConsole. The last step would be to find a way to force these URLs to go to 404/410, to permanently delete them or redirect them to the main URL if they have generated traffic.
How to found the right liquid file ?
What I did was first go to my online page to look at the name of the DIV present at this location in the code, in order to find them in my liquid files.
by searching for a file with the terms "recommendation", "card", "product", "featured" and looking inside.
PS : sry for my mistake, i'm bad in english :S
HI wooki,
Thanks for your time and effort trying to explain me how you did.
You said:
- Have a canonical tag that links to the main URL product at all times : ITS OK I HAVE CANONICAL
Thnn i had a look on my liquid sections from my SPLIT theme, and had a look on this sections: "production-recommendations.liquid, product.liquid, productquickview.liquid, main-product.liquid , main-card.liquid" to find if i found a peace of code "collection_grid,
or product-url .
The things is that i dont totally understand the original reason of the problem, and its a little bit to difficult for me i guess... I understand a bit shopify code but not that much!.
If you feel to have a look for me? 😉
On Split Theme, the Div name is collection Grid.
maybe search this term on liquid file ? 😕
Hello Wooki,
Long time since we talked.. sorry i didnt find immediately a solution... an di had many other subjects..
I am back!
First of all, how the solution you found is going on your search console? better?
second point, no problem for you english, i am french and my english is not so good but i can understand you!
Third point: i finally found a section called "card recommendations.liquid" on my store ursul.fr
I fond this line of code:
Do you think its here i need change?
I dont understand too much liquid code..
thanks for your help!
Alexis
Hi Alexis,
I had the same problem on my website, so I tried the solution offered by Wooki and it seems to work.
I work with the free theme Sense and I tried his solution on the file called card-product.liquid.
Search it on the search bar, click on it and after that, a little CTRL+F to find "card_product.url" in the file. It seems to appear 2 times, so in the two places I add | default: '#' | split: "?" | first . (See screenshot)
After that, you save it and it should work.
Now, on my website, when you click from a product page on a recommended product, the url of the downloaded page it doesn't appear the pr_strat fallback... etc. So I think this is working, I will check my Google Search Console in the next few weeks to be sure everything is okay. I hope this message could help you.
Have a nice day,
Lucas.
@LucasFrom Please correct me if I'm wrong, but by doing it this way, you solve the issue of generating the URLs, but the product recommendation module will no longer learn/optimize because the final URL will not provide Shopify with the string to learn from.
Hi Connore ! Nice to meet you !
Yes, I confirm. This is a temporary solution, but I prefer to lose this information and not having soon 10k false links crawl by Google that are giving me problems with SEO. It's a choice, if you need to track in details all the movements of your customers in your website, or you want Shopify to optimize this section for each client, the best option should be to contract a dev freelance or an agency and see with them how they can remove this issue.
I hope I help you with my answer, have a nice day !
Lucas.
@LucasFrom @Bigjjjim Hi! If I understand the code correctly, it means that if your product has size & colour variations (which are gone in the link after "?variant=..."), this code will block their indexing as well, right? So the GSC will only index one canonical URL of the product (which appears in one size/colour).
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024