Solved

POORLY FORMATTED URL FOR SEO - SHOPIFY

James88
Visitor
2 0 1

Hi There!

 

I'd like to know if anybody could help me this issue please?

 

Below is the URL crawled by Google and obviously, it's poorly formatted.  

https://nyxshapewear.com/products/butt-lifter-panties?variant=24921424167012

 

We've done so much research to solve this problem by the way. 

We can't also block the ?variant=24921424167012 on robot.txt since shopify does not provide access for this if I'm not mistaken. 

 

So I come to a point and posted this issue if somebody would volunteer to help. 

 

I also deleted | within: collection code from the link below to make  sure that URL is readable and friendly for SEO. 

FROM

<a href="{{ product.url | within: collection }}" class="product-grid-image" data-collections-related="/collections/{{collection.handle}}?view=related">

TO
<a href="{{ product.url }}" class="product-grid-image" data-collections-related="/collections/{{collection.handle}}?view=related">

 

I was not able to figure out removing variant on URL; so that Google will no longer crawled this anymore. 

 

Thanks for your kind support.

 

Best regards,

 

Accepted Solution (1)

oscprofessional
Shopify Partner
15830 2369 3072

This is an accepted solution.

Hi @James88 , 

 

It is possible to remove the ?variant=xxx from the URL. You would not be able to create links to variants then, only to products.

 

You can edit your product template -- find this code:

jQuery(function($) {
    new Shopify.OptionSelectors('productSelect', {
      product: {{ product | json }},
      onVariantSelected: selectCallback,
      enableHistoryState: true
    });

Make enable history state from true to false.

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing

View solution in original post

Replies 4 (4)

oscprofessional
Shopify Partner
15830 2369 3072

This is an accepted solution.

Hi @James88 , 

 

It is possible to remove the ?variant=xxx from the URL. You would not be able to create links to variants then, only to products.

 

You can edit your product template -- find this code:

jQuery(function($) {
    new Shopify.OptionSelectors('productSelect', {
      product: {{ product | json }},
      onVariantSelected: selectCallback,
      enableHistoryState: true
    });

Make enable history state from true to false.

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
dinnes08
New Member
4 0 0

Hi @oscprofessional ,

 

This is very informative. 

 

I was able to make it through your help only. 

 

But instead, I changed  ( enableHistoryState: false) instead of true. 

 

And the result was awesome (link provided below for your reference).

https://nyxshapewear.com/products/high-waist-mid-thigh-shaping-girdle

 

Thank you so much for your help, much appreciated.

 

Be blessed and keep helping for others. 

 

You inspired me as well to help them. 

 

Best regards,

Santaji
Visitor
1 0 0

I am facing the same issue. The URL is https://www.eeplindia.com/Electromagnetic-Flow-Meters.html

Help required

indianxporter
Visitor
1 0 0

Please Help me URL https://indianxporter.com/