Key takeaways
  • A Shopify handle is the lowercase, hyphen-separated slug that appears in a resource's URL — e.g. organic-cotton-t-shirt in /products/organic-cotton-t-shirt.
  • Handles are auto-generated from the resource name but can be manually edited in the Search engine listing section of the admin.
  • In Liquid templates, compare handles with == handle or retrieve a specific resource with all_products[handle] and collections[handle].
  • Always set up a URL redirect after changing a handle to preserve SEO value and prevent broken links.

01 What is a Shopify handle?

A Shopify handle is the URL-friendly slug that uniquely identifies a resource — product, collection, page, or blog post — within your store. It contains only lowercase letters, numbers, and hyphens, and it forms the final segment of that resource's URL. For example, a product named "Organic Cotton T-Shirt" gets the handle organic-cotton-t-shirt, producing the URL https://yourstore.myshopify.com/products/organic-cotton-t-shirt.

Shopify generates handles automatically when you create a resource, but you can edit them at any time. The same concept applies across all resource types:

Resource typeExample handleResulting URL
Productorganic-cotton-t-shirt/products/organic-cotton-t-shirt
Collectionsummer-sale/collections/summer-sale
Pageabout-us/pages/about-us
Blog posthow-to-style-linen/blogs/news/how-to-style-linen

02 Why do handles matter for SEO and UX?

Handles sit at the intersection of three concerns: URL readability, search engine ranking, and Liquid template logic.

  • SEO — Search engines read URL paths as a relevance signal. A handle like best-running-shoes carries keyword context that product-4872 does not. Descriptive, keyword-relevant handles can improve organic rankings for product and collection pages.
  • User navigation — Clean URLs build trust. A shopper who sees /collections/summer-sale instantly knows where they are; an opaque hash-based URL does not convey that.
  • Liquid access — Inside Shopify theme code, handles are the primary key for fetching and conditionally rendering resources (see Using handles in Liquid below).
i
Note

Google treats hyphens in URLs as word separators, which is why Shopify uses hyphens rather than underscores. summer-sale is indexed as two separate words; summer_sale is treated as a single token.

03 How to find a handle in the Shopify admin

The handle for any resource is visible in the admin's SEO section. For a product:

  1. Log in to your Shopify admin.
  2. Go to Products and open the product you want to inspect.
  3. Scroll to the Search engine listing section near the bottom of the page.
  4. Click Edit website SEO to expand the panel.
  5. The URL and handle field shows the full path — the handle is everything after /products/.

The same workflow applies to collections (Products → Collections), pages (Online Store → Pages), and blog posts (Online Store → Blog posts). You can also read the handle directly from the browser's address bar when the admin resource page is open — it is the last URL segment.

04 How to edit a handle

Editing a handle in Shopify takes only a few clicks, but carries SEO consequences you should address immediately:

  1. Open the resource in the admin and expand the Search engine listing panel.
  2. Click Edit website SEO and locate the URL and handle field.
  3. Replace the handle text with your new value — Shopify enforces the lowercase-and-hyphens format automatically.
  4. Save the resource.
!
Watch out

Shopify does not automatically redirect the old URL after a handle change. If you have inbound links, Google-indexed pages, or internal links pointing to the old handle, visitors and crawlers will hit a 404 until you create a redirect (see Redirects after changing a handle).

05 Best practices for naming Shopify handles

Shopify auto-generates handles from resource names, but those defaults aren't always optimal. Apply these rules when you create or clean up handles:

  • Be descriptive and keyword-relevant — use terms shoppers search for. blue-wool-scarf outperforms product-5678 for organic discovery.
  • Keep it concise — 3–5 words is usually enough. Overly long slugs add noise without benefit.
  • Use hyphens, not underscores — search engines split hyphens into individual words; underscores are treated as one token.
  • Avoid special characters and stop words — strip "the", "a", "and" from handles. They add length with no SEO value.
  • Don't include version numbers or dates — handles like t-shirt-v2-2024 become stale quickly and fragment link equity across product iterations.
  • Stay consistent across resource types — if you sell a product merino-base-layer, name the corresponding collection base-layers and the blog post how-to-care-for-base-layers. Consistent naming aids internal linking.

06 Using handles in Shopify Liquid templates

Handles are the primary way Liquid templates identify and fetch resources. Three patterns cover the vast majority of use cases:

Reading the current handle

Every resource object exposes a .handle property. Use it for conditional rendering or data attributes:

sections/product-template.liquid liquid
{{ product.handle }}
{{ collection.handle }}
{{ page.handle }}

Conditional rendering by handle

To show a section only for a specific product or collection, compare the handle with ==:

sections/promo-banner.liquid liquid
{% if collection.handle == 'summer-sale' %}
  <div class="promo-banner">Sale on now — 30% off everything!</div>
{% endif %}

Fetching a resource by handle

Use all_products or the collections global array to retrieve a specific resource anywhere in the theme — even outside its own template:

snippets/featured-product.liquid liquid
{% assign featured = all_products['organic-cotton-t-shirt'] %}
{% if featured %}
  <h2>{{ featured.title }}</h2>
  <p>{{ featured.price | money }}</p>
{% endif %}

{% assign sale = collections['summer-sale'] %}
{% if sale %}
  <p>{{ sale.products_count }} products in the sale</p>
{% endif %}
Tip

all_products[handle] incurs a storefront API call. Cache it in a Liquid variable and avoid calling it inside a loop — one call per page load is fine, dozens is not.

07 Setting up redirects after changing a handle

Any time you edit a handle you need to redirect the old URL, both to preserve inbound link equity and to prevent shoppers landing on a 404. Shopify provides a native URL redirects tool:

  1. In the admin go to Online Store → Navigation.
  2. Click URL Redirects and then Add URL redirect.
  3. In the Redirect from field enter the full old path — e.g. /products/old-handle.
  4. In the Redirect to field enter the new path — e.g. /products/new-handle.
  5. Save. Shopify returns a 301 permanent redirect, which passes link equity to the new URL.

If you're changing handles in bulk (after a store migration or a naming overhaul), Shopify's admin supports CSV import for redirects — download the template from the URL Redirects page, populate it, and re-upload.

i
Note

Also update any internal links in your theme, page content, or navigation menus that still point to the old handle. A redirect handles the 404 but a direct link is always faster than a redirect chain.

08 Conclusion

Shopify handles are small strings with outsized impact: they shape your store's URL structure, influence organic search rankings, and power the Liquid logic that makes themes dynamic. Getting handles right from the start — descriptive, keyword-relevant, hyphen-separated — means less cleanup later. And when you do need to change one, the combination of a Shopify URL redirect and updated internal links keeps both SEO and user experience intact.

For further reading, see Shopify's official URL handles documentation and the Liquid product object reference. Need a hand auditing or re-architecting your store's URL structure? That's exactly the kind of work we do — drop us a line.

07 Frequently asked questions

What is a Shopify handle?
A Shopify handle is a unique, URL-friendly identifier automatically generated from a resource's name — using only lowercase letters, numbers, and hyphens. It appears at the end of the resource URL, for example organic-cotton-t-shirt in /products/organic-cotton-t-shirt.
How do I find the handle for a Shopify product?
Open the product in your Shopify admin, scroll to the Search engine listing section, and click Edit website SEO. The handle is shown in the URL and handle field — it is the path segment after /products/.
Can I change a Shopify handle, and will it break SEO?
Yes, you can change a handle at any time in the SEO section of the admin. To protect SEO and prevent broken links, immediately create a URL redirect from the old path to the new one via Online Store → Navigation → URL Redirects.
How do you use a handle in a Shopify Liquid template?
Access the current resource handle with {{ product.handle }} or {{ collection.handle }}. To conditionally show content, use {% if product.handle == 'my-product' %}. To fetch a product by handle, use {% assign p = all_products['my-handle'] %}.
What characters are allowed in a Shopify handle?
Shopify handles may only contain lowercase letters (a–z), digits (0–9), and hyphens (-). Spaces become hyphens automatically; uppercase letters are lowercased; special characters and underscores are removed or replaced.
AM
Alex Mashkovtsev
Founder · Engineering Lead at INSO

Alex leads engineering at INSO, an AI-native product & commerce studio. He's shipped custom Shopify apps, checkout redesigns, and theme architecture for brands across the US and EU.