{"title":"Rename storefront URL paths","slug":"custom-url-paths","url":"https://support.storeconnect.com/articles/custom-url-paths","url_markdown":"https://support.storeconnect.com/articles/custom-url-paths.md","subtitle":null,"summary":"Rename the built-in words in your storefront URLs, such as /cart, /products or /account, with route store variables, and choose whether the original path keeps working, redirects, or returns not found. Use it to localize URLs, match your brand, or keep a previous site\u0026#39;s URL structure.","type":"Help_Documentation","video_url":"","keywords":"custom url paths, rename url, url segment, path segment, route store variable, route.cart, route.products, route.former, rename /products, rename /cart, localized urls, url structure, site migration, 301 redirect, 404, storePath, platform_path, route_segment_meta_tags","last_modified":"2026-10-18T22:45:46+0000","body_markdown":"The fixed words in your storefront URLs, such as `/cart`, `/checkout`, `/products` and `/account`, can be renamed for each store. A store that sets `route.cart` to `basket` serves the cart at `/basket`, and every link, redirect, canonical tag, sitemap entry and email link the platform writes uses `/basket` too. Use this to localize your URLs, match your brand, or keep the URL structure of a site you are migrating from.\n\nRenames apply to one store only. A store with no `route.` variables keeps the built-in words.\n\n## What you can and cannot rename\n\nYou can rename any of the 44 segments in the table below. Renaming a segment renames it everywhere it appears in a storefront path, including every path beneath it. For example, setting `route.account` to `my-account` moves `/account/orders` to `/my-account/orders`.\n\nThese cannot be renamed:\n\n-   `auth`, which holds sign-in and single sign-on URLs. Your identity provider stores those URLs, so they must stay fixed.\n-   POS and API paths.\n-   Values that belong to a record, such as a product slug, a category path, or an order reference number. Product category pages already sit at the top level, for example `/four-seater`, so they have no segment to rename.\n-   The store path prefix, such as `/eu`, and the domain.\n\n| Key | Built-in segment | Example path |\n|---|---|---|\n| `route.accept` | `accept` | `/auth/invitation/accept` |\n| `route.accept_terms` | `accept_terms` | `/checkout/accept_terms` |\n| `route.account` | `account` | `/account` |\n| `route.account_credits` | `account_credits` | `/account/account_credits` |\n| `route.account_points` | `account_points` | `/account/account_points` |\n| `route.accounts` | `accounts` | `/accounts` |\n| `route.activation` | `activation` | `/vouchers/\u003cvoucher\u003e/activation` |\n| `route.addresses` | `addresses` | `/account/addresses` |\n| `route.articles` | `articles` | `/articles` |\n| `route.bundles` | `bundles` | `/bundles/\u003cid\u003e/edit` |\n| `route.cart` | `cart` | `/cart` |\n| `route.carts` | `carts` | `/account/carts` |\n| `route.categories` | `categories` | `/categories` |\n| `route.check-voucher` | `check-voucher` | `/check-voucher` |\n| `route.checkout` | `checkout` | `/checkout` |\n| `route.confirm` | `confirm` | `/orders/\u003corder-reference\u003e/payment/confirm` |\n| `route.confirmation` | `confirmation` | `/auth/confirmation` |\n| `route.customer_information` | `customer_information` | `/checkout/customer_information` |\n| `route.edit` | `edit` | `/account/addresses/\u003cid\u003e/edit` |\n| `route.find` | `find` | `/find/\u003cgroup\u003e` |\n| `route.fulfillments` | `fulfillments` | `/account/fulfillments` |\n| `route.invitation` | `invitation` | `/auth/invitation` |\n| `route.missing_details` | `missing_details` | `/account/missing_details` |\n| `route.nested_configurator` | `nested_configurator` | `/bundles/\u003cid\u003e/nested_configurator` |\n| `route.new` | `new` | `/account/addresses/new` |\n| `route.order` | `order` | `/checkout/order` |\n| `route.orders` | `orders` | `/account/orders` |\n| `route.password` | `password` | `/auth/password` |\n| `route.payment` | `payment` | `/account/subscriptions/\u003cid\u003e/payment` |\n| `route.payment_gateway` | `payment_gateway` | `/checkout/payment_gateway` |\n| `route.payment_information` | `payment_information` | `/checkout/payment_information` |\n| `route.payment_methods` | `payment_methods` | `/account/payment_methods` |\n| `route.pending` | `pending` | `/auth/confirmation/pending` |\n| `route.product_approvals` | `product_approvals` | `/account/product_approvals` |\n| `route.product_comparison` | `product_comparison` | `/product_comparison` |\n| `route.products` | `products` | `/products` |\n| `route.profile` | `profile` | `/account/profile` |\n| `route.register` | `register` | `/accounts/register` |\n| `route.search` | `search` | `/search` |\n| `route.shipping_information` | `shipping_information` | `/checkout/shipping_information` |\n| `route.sign_in` | `sign_in` | `/auth/sign_in` |\n| `route.sign_out` | `sign_out` | `/auth/sign_out` |\n| `route.subscriptions` | `subscriptions` | `/account/subscriptions` |\n| `route.vouchers` | `vouchers` | `/vouchers/\u003cvoucher\u003e/activation` |\n\nThe segments under `/auth`, such as `sign_in` and `password`, can be renamed even though `auth` itself cannot. Renaming `sign_in` to `login` gives `/auth/login`.\n\n## Choose a word\n\nThe new word must:\n\n-   use only lowercase letters, digits, hyphens and underscores, and start and end with a letter or digit\n-   not be a word the platform already uses in a storefront path that cannot be renamed, such as `pos`, `api`, `sitemap`, `promotions` or `payments`\n-   not be the **Path** of another store on the same Salesforce org, or a POS path\n-   not be used by another `route.` variable on the same store\n\nA word that breaks one of these rules is ignored, and the built-in word stays in use. The [web console](web-console) shows a warning that names the variable and the reason.\n\nYou can reuse another built-in segment as the new word, for example setting `route.products` to `categories`. The rename wins, and the pages the reused word reached, such as the `/categories` listing, can no longer be reached unless you rename that segment too. The web console lists the pages that become unreachable.\n\nA content page or a product category whose **Path** matches the new word cannot be reached while the rename is in place, and no warning is shown. Choose a word that no page or category uses.\n\n## Rename a segment\n\n### Before you start\n\n-   Find any links you typed yourself that use the built-in word, such as a menu item URL of `/products/merino-hiking-socks` or a link in page content. The platform rewrites the links it generates but not the ones you type. They keep working while the original path is left at the default, `200`.\n-   If your theme replaces the built-in layout template (`layouts/theme.liquid`), confirm the replacement still contains `{%- default route_segment_meta_tags: nil -%}` at the top and `{{ route_segment_meta_tags }}` in the `\u003chead\u003e`. Without them, the storefront's JavaScript keeps requesting the built-in paths.\n\n### Steps\n\n1.  Open the **Store** record and go to the **Store Variables** related list.\n2.  Click **New**.\n3.  Enter a **Name**, for example `Rename products path`.\n4.  Enter the **Key** for the segment, for example `route.products`.\n5.  Enter the new word as the **Value**, for example `shop`.\n6.  Save the record. **Available in Liquid** does not need to be checked.\n7.  On the **Store** record, change the **Cache Version** field to any different value. This regenerates cached menus and page fragments, which otherwise keep the built-in word in their links until they expire.\n8.  Open the [web console](web-console) and load a storefront page. Correct any variable that the console reports as rejected.\n\nThe change takes effect on the next page request. In this example, a product page that was at `/products/merino-hiking-socks` is now served at `/shop/merino-hiking-socks`, and product links across the storefront point to `/shop/`. The old `/products/merino-hiking-socks` address still loads the page until you change what the original path does.\n\n## Choose what the original path does\n\nAfter a rename, the original built-in path keeps serving the page by default. To change that, add a second store variable for the same segment with the key `route.\u003csegment\u003e.former`, for example `route.products.former`.\n\n| Value | What the original path does |\n|---|---|\n| `200` (default) | Keeps serving the page. Both the original and the renamed path work. |\n| `301` | Permanently redirects to the renamed path. |\n| `404` | Returns your store's not-found page. |\n\nA `.former` variable has no effect unless the same segment is renamed. A value other than `200`, `301` or `404` is ignored, and the original path keeps serving. Both cases show a warning in the web console.\n\n### Redirect the original path (301)\n\n-   A page request redirects with a 301 status. A form post or other non-page request redirects with a 308 status, so the submitted data is sent again to the renamed path.\n-   The query string is kept, and so is a format suffix: `/cart.json` redirects to `/basket.json`.\n-   Capitalization is ignored, so `/Cart` also redirects.\n-   Every path beneath the segment redirects too. `route.account.former` set to `301` redirects `/account/orders` to `/my-account/orders`.\n\nUse `301` when you rename a segment on a live store. Search engines move their index to the renamed URLs, and bookmarks and old links keep working.\n\n### Retire the original path (404)\n\n-   Page requests return your store's themed not-found page with a 404 status.\n-   Every path beneath the segment is retired too. Retiring `checkout` also retires `/checkout/customer_information`.\n-   Form posts and other requests to the original path are refused with a 404, so nothing reaches the cart, checkout or account through it.\n-   To serve something at a retired path, create a content page with that **Path**. It is shown instead of the not-found page.\n\n:::warning\nBefore you set `404`, check every link and redirect that still uses the built-in word. A retired path breaks them:\n\n-   **Route mappings.** The redirect StoreConnect creates when a product or article URL changes uses the built-in `/products/` or `/articles/` word, for example **To** `/products/merino-hiking-socks`. The **To** value is not rewritten, so with `route.products.former` set to `404` that redirect ends on the not-found page. Update the **To** field of affected [route mappings](route-mapping) to the renamed path, or use `301` instead.\n-   **Links you typed**, such as menu item URLs and links in page content.\n-   **Custom theme code** that builds a storefront path itself. See the next section.\n:::\n\n## Theme code that builds storefront paths\n\nThe built-in theme already uses your renamed words. Custom theme code needs a change only if it writes a storefront path itself, for example a hand-written `fetch` to `/cart`.\n\n-   **JavaScript.** Pass the built-in path to `window.StoreConnect.storePath`, which returns it in the store's words with the store path prefix added. On a store at `/eu` that renames `cart` to `basket`, `window.StoreConnect.storePath(\"/cart\")` returns `/eu/basket`. Do not swap the words yourself: the helper knows which parts of a path are segments and leaves a product slug that happens to be `cart` alone.\n-   **Liquid.** The `path`, `fullpath`, `local_path` and `url` attributes of `current_request` return the path in the store's words. To compare against a built-in path, use `current_request.platform_path`, which returns the path in the built-in words, for example `/cart` while the shopper is on `/basket`. See the [request object reference](request-liquid-object-reference).\n\nAn untranslated path keeps working while the original path is left at `200`, which hides the problem. It fails when you later set the original path to `404`, and a non-page request can lose the submitted data across a `301`. Fix custom code before you change the `.former` value.\n\n## Undo a rename\n\n1.  Open the **Store** record and go to the **Store Variables** related list.\n2.  Delete the `route.\u003csegment\u003e` variable and any matching `route.\u003csegment\u003e.former` variable.\n3.  On the **Store** record, change the **Cache Version** field to any different value.\n\nLinks go back to the built-in word, and the built-in path serves the page again. The renamed path stops working, so if search engines or customers already use it, add a [route mapping](route-mapping) from the renamed path to the built-in one."}