---
title: "Keep a migrated page's old URL as the canonical URL"
source: https://support.storeconnect.com/articles/canonical-path-override
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.
---
# Keep a migrated page's old URL as the canonical URL

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`.

**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:

| Page | Canonical Path Override | Canonical URL |
|---|---|---|
| `/products/miami-outdoor-chair` | `/miami-65422.html` | `https://shop.example.com/miami-65422.html` |
| The same page on a store with the **Path** `au` | `/miami-65422.html` | `https://shop.example.com/au/miami-65422.html` |
| `/dining-tables?products_page=2` | `/dining/tables/` | `https://shop.example.com/dining/tables?products_page=2` |
| Any | Blank | The page's own URL |

A 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.

## Before you start

- 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.

## Set the override

1.  Open the **Product** or **Product Category** record.
2.  In **Canonical Path Override** (`s_c__Canonical_Path_Override__c`), enter the old path, starting with `/`. For example, `/miami-65422.html`.

    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.

3.  Save the record.
4.  Open the product or category page on your storefront and view the page source.

The `<link rel="canonical">` tag now shows the old URL, for example `https://shop.example.com/miami-65422.html`.

On a product page, only the product's own override is used. On a category page, the category's override is used.

## At cutover

1.  Clear **Canonical Path Override** on each product and category that has one.
2.  Change the **Type** of each of those route mappings from `Rewrite` to `301 - Permanent Redirect`, so the old URL redirects to the new one.

Each page's canonical URL returns to the page's own StoreConnect URL.

---

## 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/canonical-path-override