How to rank one URL over another on Google?

Topic summary

Issue: A product has two URLs—one base and one with a variant parameter (?variant=ID)—both leading to the same page. The store owner worries the parameterized URL harms SEO and wants only the base URL to be used.

Key points:

  • Google treats both URLs as the same page; the query string is just variant info, not a separate page.
  • Canonical tags are present and point to the base URL, telling Google which version to index. This should prevent duplicate-content issues.
  • The URL parameter appears because JavaScript auto-selects the first product variant and appends ?variant=… to the URL.

Recommendations:

  • Identify the app/theme script auto-selecting the variant and disable that behavior if possible.
  • Add a placeholder option (e.g., “Select an option”) so no variant is preselected on load, avoiding the parameter.
  • If distinct URLs per variant are desired (e.g., /pink, /blue), Shopify may require custom development or third-party apps.
  • Canonical tag usage is advised; it appears already correctly implemented.

Status: No confirmed fix yet. Likely minimal SEO risk due to canonicalization; next steps are adjusting app/theme behavior if the URL parameter is undesirable.

Summarized with AI on January 19. AI used: gpt-5.

Hi there

So I have this problem, that this link: www.popandpal.dk/products/dyreplakat-et-eventyr-pink links to the same landingpage as this link, that appears on my webshop when I click on the product: https://www.popandpal.dk/products/dyreplakat-et-eventyr-pink?variant=41498906362045

On google, I am ranking for this site: www.popandpal.dk/products/dyreplakat-et-eventyr-pink

I kinda need the other one to go away; how would one do that, so its only the above that refers to my landing page?

Could you kindly explain it to me as I was a little kid not understanding that much of coding etc? :grinning_face_with_smiling_eyes:

With kind regards

Hey Erencicek,

In the world of SEO (and Google), www.popandpal.dk/products/dyreplakat-et-eventyr-pink and https://www.popandpal.dk/products/dyreplakat-et-eventyr-pink?variant=41498906362045 are considered the same page. The query string “?variant=41498906362045” does not create a new page but rather acts as a parameter that provides additional information about the product variant. Therefore, Google builds one SEO profile around /dyreplakat-et-eventyr-pink/.

I am not sure how you have set up your switches, but it seems that you want the URL to change completely when a user clicks on a swatch. For example, /dyreplakat-et-eventyr-pink/ and /dyreplakat-et-eventyr-blue/ or /dyreplakat-et-eventyr-pink/variation1/ and /dyreplakat-et-eventyr-pink/variation2/.

However, there is a high probability that you won’t be able to achieve this using Shopify. While Shopify is a powerful platform, it has limitations when it comes to customization. You may need custom development or the use of a third-party app to achieve the desired URL setup. Please follow my Twitter account https://twitter.com/VoxfaOfficial to stay up-to-date with my Shopify tips or visit the Shopify section of my website https://voxfa.com/category/shopify/. Thank you.

Hi !

Thank you so much for your time and reply!

My problem is, that my SEO program tells me that only this site ranks on google: www.popandpal.dk/products/dyreplakat-et-eventyr-pink , with my key word. Instead the user are redirected to this site URL: https://www.popandpal.dk/products/dyreplakat-et-eventyr-pink?variant=41498906362045

This really hurts my SEO, they tell me and I dont know what to do about it

With kind regards

Hej,

Tak skal du have

Hi Erencicek,

Your issue is genuine and very common. Duplication of content is often faced by Shopify store owners, and it is one of the biggest SEO nightmares, as you may lose the ranking on the search engine results page (SERP) or permanently get suspended from the search engine due to this issue.

You can use the ‘canonical tag’ for it.

This tag is added in the section of the page, and the preferred version of the webpage is canonicalized.

In your case, the canonical tag would look like this:

Hope it helps!

Leesha

SEOKart