Skip to content
Log in

Route mapping

On this page

Route mappings control what happens when a visitor lands on a URL that has changed. There are three types:

  • 301 Permanent — redirects the visitor to the new URL and passes SEO value to the destination.
  • 302 Temporary — redirects the visitor to a new URL without passing SEO value.
  • Rewrite — serves the destination’s content at the original URL, with no visible redirect.

StoreConnect automatically creates a 301 route mapping whenever a slug or path changes on any of these records:

  • Product
  • Product Category
  • Page
  • Article
  • Article Category

Route mapping records can be deleted when a redirect is no longer needed. Find them at Configuration > Advanced > Route Mapping in the StoreConnect backend.

A slug must be unique for each product. A path must be unique for each store, meaning two pages can share a path if they belong to different stores.

:::tip If you get a “slug or path must be unique” error but cannot find a conflicting record, check Route Mapping. A previous version of that path may still be referenced there — delete the stale route mapping to free up the path. :::

Routing from one domain to another

Some DNS providers let you configure a domain-level redirect directly. If yours does, set the destination URL in your DNS settings and optionally append a UTM tracking code. Any orders placed by visitors arriving via that redirect carry the UTM code, so you can see which domain referred them.

If your DNS host does not support this, you can use StoreConnect to handle it instead.

Create a store that runs on the domain you want to route from, with the following configuration:

  1. Create an empty homepage.
  2. Create an empty taxonomy for this store.
  3. Create a content block.
    • Template = No added Styling
    • Content = https://domain-to-route-to.com?utm_source={domain-routing-from}'" /> (the UTM parameter is optional)
  4. Set the store to use this content block as the Head Content.
  5. Set the Store record’s Domain to the domain you are routing from.
  6. Add the relevant CNAME records on your domain.

Anyone who arrives on that site triggers the redirect embedded in the page’s head and is sent to the intended destination. If you include UTM tracking in the URL, any orders placed carry the UTM code so you can see which domain referred the customer.

Migrating to StoreConnect

When migrating an existing site into StoreConnect, create Route Mapping records to redirect your old URLs to their new equivalents. This ensures search engines and external links continue to send traffic to the right pages. This approach works for same-domain migrations where you can use relative paths. Records can be bulk uploaded with a tool like dataloader.io.

Products use /products/ as the path prefix before the slug by default. Change this by editing the Product2 URL Path setting in your org’s Custom Metadata Types in Salesforce Setup.

Was this article helpful?

Was this article helpful?