---
title: "Change product URLs to match product hierarchy"
source: https://support.storeconnect.com/articles/hierarchical-category-urls
type: article
format: markdown
site: StoreConnect Support — product and developer documentation for StoreConnect
site_index: https://storeconnect.com/llms.txt
docs_index: https://support.storeconnect.com/llms.txt
note: Append .md to any page or article URL on this site to get its Markdown form.
---
# Change product URLs to match product hierarchy

By default, every product category page has a single-segment address, such as `/four-seater`, however deep the category sits in your catalog. With hierarchical category URLs turned on, the address follows the category tree instead: `/living-room/lounges/four-seater`.

Customers and search engines can then see where a category sits from the URL alone, and the breadcrumb trail on the page shows every level. This topic explains how the address is built, what happens to the old addresses, and what turning the setting off again involves.

:::warning
Turning this on is effectively one-way. Old category addresses are permanently redirected to the new ones, and browsers and search engines remember a permanent redirect. If you turn the setting off later, some visitors and search engines keep going to the hierarchical addresses for a while. Decide on your URL structure before you turn it on.
:::

## How a category's URL is built

The URL joins the **Path** of each category from the top of the tree down to the category itself.

-   **One parent per category.** Where a category has more than one parent, the URL uses the parent marked **Is the primary parent of the child** on the hierarchy record. If none is marked, it uses the parent with the lowest **Position**. Breadcrumbs on product pages use the same parent. See [creating the product category hierarchy](product-categories) for these fields.
-   **Hidden categories still count.** Checking **Hide Category** removes a category from navigation only. A category under a hidden parent still includes the parent's **Path** in the URL, and the parent's name in the breadcrumbs. For example, a category `special-buy` under a hidden `clearance` category is at `/clearance/special-buy`.
-   **Only category pages change.** Product, article, and content page URLs are not affected.

Because the URL includes every parent, changing a parent category's **Path**, or moving a category to a different parent, changes the URL of that category and every category below it. The previous hierarchical address then returns a 404 (page not found), because the address is matched one level at a time against the current category tree. To keep links to it working, redirect it with a [route mapping](route-mapping).

The exception is a category that keeps its old parent as a second, non-primary parent. The old address still resolves through that parent and permanently redirects (HTTP 301) to the new one, so it needs no route mapping.

## What happens to existing URLs

When the setting is on:

-   Links to categories across your storefront, including menus, category listings, and search results, use the hierarchical URL.
-   The canonical tag on each category page and the category entries in your [sitemap](sitemap-file) use the hierarchical URL.
-   The old single-segment URL still works. It permanently redirects (HTTP 301) to the hierarchical URL, and any query string, such as a filter or page number, is kept. The same applies to an address with different capitalization, or one that reaches the category through a parent that is not the primary one.
-   In the [Website Builder](website-builder) draft preview, category links show the single-segment URL. The published storefront shows the hierarchical URL.

## Turn on hierarchical category URLs

1.  Open the **Store** record and go to the **Store Variables** related list.
2.  Click **New**.
3.  Enter a **Name**, for example `Hierarchical category URLs`.
4.  Enter the **Key** `catalog.category_paths.hierarchical`.
5.  Enter the **Value** `true`.
6.  Save the record. **Available in Liquid** does not need to be checked.
7.  On the **Store** record, change the **Cache Version** field to any different value. This regenerates cached menus and page fragments, which otherwise keep the old links until they expire.

Open a nested category at the old address, for example `/four-seater`. The browser now lands on the full address, such as `/living-room/lounges/four-seater`, and the breadcrumb trail shows Living Room and Lounges above the category.

## Turn hierarchical category URLs off again

1.  Open the **Store** record and go to the **Store Variables** related list.
2.  Delete the `catalog.category_paths.hierarchical` variable, or change the **Value** to `false`.
3.  On the **Store** record, change the **Cache Version** field to any different value.

Category links, canonical tags, and sitemap entries go back to single-segment URLs, and the single-segment URLs stop redirecting. The hierarchical addresses keep loading, so no link breaks, but they no longer redirect back. Browsers and search engines that remember the earlier redirect keep sending visitors to the hierarchical address until they recheck it, and search engines then have to move their index back to the single-segment URLs.

---

## Follow StoreConnect

- [Email Newsletter](https://storeconnect.com/c/lp-newsletter)
- [LinkedIn Newsletter](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7444956928444862464)
- [YouTube](https://www.youtube.com/channel/UCngKdP2x8l1wcbAKW3tvU8g)
- [LinkedIn](https://www.linkedin.com/company/storeconnect)
- [X / Twitter](https://x.com/storeconnecthq)

## Popular Links

- [Partners](https://storeconnect.com/partners)
- [Become a Partner](https://storeconnect.com/become-a-partner)
- [News](https://storeconnect.com/articles/news)
- [Events](https://storeconnect.com/articles/events)
- [Feature Comparison](https://storeconnect.com/how-we-compare)
- [Download a free trial](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkeKUAT)
- [Book a Demo](https://storeconnect.com/contact)

## Documentation

- [Help documentation](https://support.storeconnect.com/help-documentation)
- [AI agents](https://support.storeconnect.com/ai)
- [Videos & tutorials](https://support.storeconnect.com/videos-tutorials)
- [Developer reference](https://support.storeconnect.com/developer-reference)
- [Release notes](https://support.storeconnect.com/release-notes)
- [Troubleshooting](https://support.storeconnect.com/troubleshooting)
- [Trust Center](https://trust.getstoreconnect.com/)
- [Status Page](https://status.storeconnect.com/)

## Contact

- info@getstoreconnect.com
- US +1 415 745 3230
- AUS +61 2 8365 2308

100 S Ashley Dr, Suite 600-2461
Tampa FL 33602-600 USA

Level 22, Sydney Place
180 George Street
Sydney, NSW, 2000, AUS

## Machine-readable

- [Site index for agents](https://storeconnect.com/llms.txt): curated map of the StoreConnect site in llms.txt format
- [Documentation index for agents](https://support.storeconnect.com/llms.txt): full technical and product documentation map

Every page and article on this site has a Markdown rendering: append `.md` to its URL.

Continue in Markdown: [Help documentation](https://support.storeconnect.com/help-documentation.md) · [Developer reference](https://support.storeconnect.com/developer-reference.md) · [Videos & tutorials](https://support.storeconnect.com/videos-tutorials.md) · [Release notes](https://support.storeconnect.com/release-notes.md)

---

StoreConnect Support — https://support.storeconnect.com/articles/hierarchical-category-urls