A Step-by-Step Guide for Creative Entrepreneurs to Protect Their Secret Sauce
If you’re like me and prefer to keep your best-selling products under wraps—so your competition can’t easily spy on your top-performers—you might want to disable the Shopify feature that displays your best-selling items through the URL. Specifically, the URL parameter can give competitors instant insight into your hottest products.
Why Disable the Best-Selling URL Feature?
Protect Your Competitive Edge: Revealing your best-selling products can help competitors reverse-engineer your success. Keeping this data private means your secret sauce stays secret.
Control Your Brand’s Narrative: When customers see a curated product lineup rather than an automated “best-sellers” list, you maintain greater control over how your brand is perceived.
Encourage Organic Discovery: Instead of customers gravitating towards what’s already popular, a custom collection can help drive interest in lesser-known items that you might want to promote.

How to Disable the Best-Selling URL Feature on Shopify
While Shopify doesn’t offer a one-click setting to disable this URL parameter, you can achieve the desired result by editing your theme’s code or settings.
Here’s a step-by-step guide:
Step 1: Duplicate Your Theme
Before making any changes, duplicate your live theme as a backup. Go to Online Store > Themes, click the three dots next to your current theme, and select Duplicate. This ensures you have a fallback if anything goes wrong.
Step 2: Identify the Relevant Code
You’ll need to locate the code that handles collection sorting. This is typically found in the collection.liquid or a related template file. Look for code segments referencing sort_by or similar parameters.
Step 3: Modify or Remove the Best-Selling Sort Option
There are a couple of approaches:
Option A: Remove the Best-Selling Option from the Sorting Dropdown
If your theme displays a dropdown for sorting, you can edit the options to remove “Best Selling.” Look for a code snippet similar to:
{% for option in collection.sort_options %} {% if option.value != 'best-selling' %} <option value="{{ option.value }}">{{ option.label }}</option> {% endif %} {% endfor %}
This code checks if the sort option isn’t “best-selling” before displaying it. Adjust your code accordingly to filter out the unwanted option.
Option B: Redirect Requests with the Best-Selling Parameter
If you want to handle cases where someone manually appends ?sort_by=best-selling to your URL, you can add a redirect in your theme’s collection.liquid file:
{% if request.query.sort_by == 'best-selling' %} {% assign query = request.query | remove: 'sort_by=best-selling' %} <script> window.location.href = '{{ collection.url }}{{ query }}'; </script> {% endif %}
This snippet detects if the URL includes best-selling and redirects visitors to the default collection view.
Each theme is unique, so if you can't find it or are unsure of the code on your particular theme, please reach out to your theme developer.
Step 4: Save and Test Your Changes
After making your modifications, save your changes and test your collection pages. Enter your store URL with the /collections/all?sort_by=best-selling parameter to ensure that it no longer displays your best-selling products as intended.
Disabling the best-selling URL parameter is a smart move for anyone who wants to maintain a competitive edge and control over their brand’s narrative. While it might take a bit of code tweaking, the payoff is worth it—your secret best sellers remain your secret!
Have you tried customizing your Shopify store’s sorting options? What strategies have you used to protect your competitive advantage? Drop your thoughts in the comments below and let’s share some insights!
Happy customizing, and here’s to keeping your creative edge safe!
Комментарии