Weird url adding in google search console

Solved

Weird url adding in google search console

Bigjjjim
Shopify Partner
12 0 3

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

Accepted Solution (1)

made4Uo
Shopify Partner
3845 717 1187

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. 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free

View solution in original post

Replies 34 (34)

made4Uo
Shopify Partner
3845 717 1187

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. 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free
Bigjjjim
Shopify Partner
12 0 3

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!

made4Uo
Shopify Partner
3845 717 1187

It usually appears below the product page. It depends on the theme

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free
frankymartin
Shopify Partner
32 0 20

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

Chawww
Tourist
3 0 3

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!

made4Uo
Shopify Partner
3845 717 1187

Hi @Chawww,

 

Nothing to fix since it is a normal behavior. The links are passing parameters for recommendation

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free
fanwer
Tourist
5 0 7

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"? 

A Shopify Player
frankymartin
Shopify Partner
32 0 20

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 %}

fanwer
Tourist
5 0 7

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.

 

rubbish URL.png

 

 

 

 

 

 

A Shopify Player
frankymartin
Shopify Partner
32 0 20

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.

Alexis_Théry
Shopify Partner
15 0 5

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?

frankymartin
Shopify Partner
32 0 20

Hi, should be something like;

{%- if group.user_agent.value == '*' -%}
{{ 'Disallow: /products/*?pr=*' }}
{%- endif -%}

Alexis_Théry
Shopify Partner
15 0 5

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? 

fanwer
Tourist
5 0 7

I come here to update the piece of code here, and it turned out that it worked. See the screenshot from GSC.

screenshot from GSC.png

 

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 -%} 

A Shopify Player
frankymartin
Shopify Partner
32 0 20

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 -%}

DariusWS
Shopify Partner
84 1 20

@frankymartin Solution with noindex will not work because you can't get url params with liquid

GeetSoGood
New Member
4 0 0

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.

Alexis_Théry
Shopify Partner
15 0 5

@Frankymartin 

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? 

Murtada
Visitor
1 0 0

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 لقطة شاشة 2024-02-08 001107.png

itziar
Visitor
2 0 0

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

theDMM
Excursionist
33 0 20

@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?

robots.png

theme file.png

  

Cheers,
Connor
klaasmondria
Visitor
1 0 0

and is this work for you. if not, did you solve it?

Josep97
Shopify Partner
8 0 0

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!

theDMM
Excursionist
33 0 20

Wooki
Tourist
4 0 3

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

Alexis_Théry
Shopify Partner
15 0 5

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!

 

Wooki
Tourist
4 0 3

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 

Alexis_Théry
Shopify Partner
15 0 5

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? 😉

 

Wooki
Tourist
4 0 3

On Split Theme, the Div name is collection Grid.
maybe search this term on liquid file ? 😕 

Wooki_0-1705674269410.png

 

Alexis_Théry
Shopify Partner
15 0 5

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: 

 

<a href="{{ product.url }}" class="cart-product-item-image">
        <img    src="{{ product.featured_media | image_url: width: 170, height: 170, crop: 'center' }}" alt="{{ product.title | escape }}"
          srcset="{{ product.featured_media | image_url: width: 170, height: 170, crop: 'center' }} 170w, {{ product.featured_media | image_url: width: 340, height: 340, crop: 'center' }} 340w"
          sizes="170px"
          loading="lazy" class="lazy"
          width="170" height="170"
        />
</a>
 
<a href="{{ product.url }}" class="cart-product-item-title">
<span class="underline-animation">{{ product.title }}</span>
</a>

 

 

Do you think its here i need change?

I dont understand too much liquid code.. 

 

thanks for your help!

 

Alexis 

 

 

LucasFrom
Tourist
5 0 1

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)

LucasFrom_0-1710991537422.png

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. 

theDMM
Excursionist
33 0 20

@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.

Cheers,
Connor
LucasFrom
Tourist
5 0 1

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. 

Nick_St
Visitor
1 0 0

@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).