Remove variant id from product url?

3 0 14

I was trying to update my site for Shopify variant images (annoying this doesn't work natively!), and although I believe I changed everything back to it's original state, now I am getting variant ids at the end of every product url, and "copy of" before each product name.  For example:

Instead of:

Any insight on how to fix this would be much appreciated, thanks!

Shopify Partner
1 0 1

"Copy of" isn't happening on every product, that seems like its something you might have created in the admin area by mistake.

For the variants somewhere in your templates (maybe product? might be code for selecting the first available variant?) you have


being generated.

because the Shopify.OptionSelectors have enableHistoryState set to true when the change event is triggered by the above code its adding the variant _GET var to the url.  

You'll need to work out where those triggers are being made and why to decide if you can just delete them or not.



1 Like
3 0 14

Thanks so much Craig!  I found the Shopify.OptionSelectors function in theme.liquid, changed "true" to "false", and the offending string is gone.  Cheers!


 // initialize multi selector for product
    $(function() {
      new Shopify.OptionSelectors("product-select", { product: {{ product | json }}, onVariantSelected: selectCallback, enableHistoryState: false });


1 Like
54 0 14

Does anyone have any advice on how this affects search rankings with Google? Do they see these Variants as duplicate content? for example we write 300+ word descriptions. But the only difference the variant changes is the size or color. 

Would ths be considered duplicate content by Google?

Example here:

Visit our Luxury Bikini and Women's Fashion Website, Featuring many highly sought after and limited edition pieces from around the world!
New Member
1 0 0


To remove ?variant=30927664709766 Go to the product template or product.liquid file and search: 

enableHistoryState: true

replace it to  enableHistoryState: false

that's it. 

Contact me at if more help needed! 

Thank you!