How do I remove variant number from the URL

Topic summary

A store owner wants to remove variant parameters (e.g., ?variant=43320402739437) from product URLs for cleaner links.

Community consensus:

  • Multiple users confirm these parameters cannot be removed—they’re essential for Shopify to identify and direct customers to specific product variants.
  • The only alternative is splitting variants into separate individual products.

Proposed workarounds:

  1. Code modification: One user suggests editing global.js to remove the updateURL() function’s variant parameter logic, though effectiveness depends on the theme.

  2. App-based solution: Another recommends installing Shopify apps like “Clean URLs,” “SEO Suite,” or “Variant URL” from the App Store. These handle URL management without coding and often include additional SEO features.

Status: The discussion presents conflicting advice—some say removal is impossible, while others offer technical or app-based solutions. No definitive resolution on whether workarounds affect core functionality.

Summarized with AI on October 25. AI used: claude-sonnet-4-5-20250929.

Hey,

I have a small problem that needs to be solved. As I added different variants to my products, My page started containing product variant numbers like: https://www.decorglance.com/products/butterfly-shape-wood-wall-shelf-book-shelf-oak-wood?variant=43320402739437

  • You can’t remove that, that is how Shopify sends your customer to that particular variant.

Hi @KartikKumar ,

Those are parameters that Shopify uses to identify which variant is currently selected. They can’t be removed from the URL. The only alternative would be to split the variants into individual products.

Hope this help

Yo not sure does it work on your theme but I had the same issue and this is how I got around it. Go to edit code find folder: global.js in that folder search for:

updateURL() { if (!this.currentVariant || this.dataset.updateUrl === ‘false’) return; window.history.replaceState({}, ‘’, ${this.dataset.url}?variant=${this.currentVariant.id}); }

Replace with:

updateURL() {

if (!this.currentVariant || this.dataset.updateUrl === ‘false’) return;

}

Hey,
check this out

https://vitridesignstudio.com/product/rdj-fan-art/

This is the best option for most store owners as it doesn’t require coding and handles all the technical details for you.

  1. Go to your Shopify Admin > Apps > Visit the Shopify App Store.

  2. Search for apps like:

    • “Clean URLs”

    • “SEO Suite” (many include this feature)

    • “Variant URL”

  3. Install a well-rated app. Popular options include:

    • SEO Manager by Plug in SEO

    • EasyRedirects by Bithound

    • Variant Image URL by Station

  4. Configure the app according to its instructions. Most will work automatically after installation.

Pros: Easy, no coding, often includes other beneficial SEO features.

You can’t remove that, that is how Shopify sends your customer to that particular variant.