{"title":"Keep a migrated page's old URL as the canonical URL","slug":"canonical-path-override","url":"https://support.storeconnect.com/articles/canonical-path-override","url_markdown":"https://support.storeconnect.com/articles/canonical-path-override.md","subtitle":null,"summary":"Set Canonical Path Override on a product or product category so the canonical URL stays the old site\u0026#39;s URL while a rewrite route mapping serves it there. Use it during a same-domain migration, then clear it at cutover.","type":"Help_Documentation","video_url":"","keywords":"canonical url, canonical path override, Canonical_Path_Override__c, rel canonical, og:url, site migration, rewrite, route mapping, cutover, product canonical, category canonical, sitemap, seo","last_modified":"2026-10-20T05:27:31+0000","body_markdown":"Use this process when you are moving a site to StoreConnect on the same domain and want search engines to keep indexing the old URLs until cutover. A common pattern is to serve each old URL in place with a [route mapping](route-mapping) whose **Type** is `Rewrite`. While that is in place, the page's canonical URL should be the old URL that search engines already know, such as `/miami-65422.html`, rather than the new `/products/miami-outdoor-chair`.\n\n**Canonical Path Override** sets that canonical on a product or product category. StoreConnect keeps the store's domain, the store **Path** (if any), and the query string, and replaces only the path:\n\n| Page | Canonical Path Override | Canonical URL |\n|---|---|---|\n| `/products/miami-outdoor-chair` | `/miami-65422.html` | `https://shop.example.com/miami-65422.html` |\n| The same page on a store with the **Path** `au` | `/miami-65422.html` | `https://shop.example.com/au/miami-65422.html` |\n| `/dining-tables?products_page=2` | `/dining/tables/` | `https://shop.example.com/dining/tables?products_page=2` |\n| Any | Blank | The page's own URL |\n\nA trailing slash is dropped, because StoreConnect redirects URLs that end in a slash and a canonical must not point at a redirect. The store's sitemap lists the same URL as the canonical tag. The default theme uses it for both the `rel=\"canonical\"` link and the `og:url` tag, so no theme change is needed.\n\n## Before you start\n\n- Make sure the old path loads on every store that sells the product or shows the category. The override belongs to the record, not the store, so it applies on all of them. A **Route Mapping** with **Store** left blank covers every store. Search engines tend to ignore a canonical URL that returns a 404.\n\n## Set the override\n\n1.  Open the **Product** or **Product Category** record.\n2.  In **Canonical Path Override** (`s_c__Canonical_Path_Override__c`), enter the old path, starting with `/`. For example, `/miami-65422.html`.\n\n    Leave out the domain and the store **Path**. The field rejects a domain, spaces, a query string (`?`) or an anchor (`#`). Percent-encode any other special character, for example `%20` for a space.\n\n3.  Save the record.\n4.  Open the product or category page on your storefront and view the page source.\n\nThe `\u003clink rel=\"canonical\"\u003e` tag now shows the old URL, for example `https://shop.example.com/miami-65422.html`.\n\nOn a product page, only the product's own override is used. On a category page, the category's override is used.\n\n## At cutover\n\n1.  Clear **Canonical Path Override** on each product and category that has one.\n2.  Change the **Type** of each of those route mappings from `Rewrite` to `301 - Permanent Redirect`, so the old URL redirects to the new one.\n\nEach page's canonical URL returns to the page's own StoreConnect URL."}