Back to Guides
Guide
12 min read

How to Create Shopify Redirects

URL redirects are essential for maintaining SEO value and providing a smooth customer experience. This guide shows you how to set up and manage redirects in Shopify.

Flex Commerce Team
Updated February 2024

Why Redirects Matter

When you delete a product, change a URL, or migrate to Shopify from another platform, the old URLs still exist in Google's index, in customer bookmarks, and in links from other websites. Without proper redirects, these become broken links that hurt your SEO and frustrate customers.

A redirect tells browsers and search engines that a page has moved to a new location. This preserves the SEO value (link equity) from the old URL and sends visitors to the correct page instead of an error.

The Cost of Broken Links

  • Lost SEO value from backlinks pointing to dead pages
  • Poor user experience when customers hit 404 errors
  • Lost sales from customers who leave instead of searching
  • Crawl budget waste as Google discovers more broken links

Properly implemented redirects solve all of these problems. They ensure that every URL pointing to your store leads somewhere useful, whether it's from Google, social media, email campaigns, or external websites.

Types of Redirects

There are several types of redirects, but two are most relevant for Shopify stores. Understanding the difference is crucial for SEO.

Recommended

301 Redirect (Permanent)

A 301 redirect tells search engines that a page has permanently moved to a new location. This passes approximately 90-99% of the link equity to the new URL.

Use for: Deleted products, changed URLs, platform migrations, restructuring collections

Temporary

302 Redirect (Temporary)

A 302 redirect tells search engines that a page has temporarily moved. The original URL retains its SEO value, and Google keeps it in the index.

Use for: Temporary sales pages, A/B testing, maintenance redirects

Shopify creates 301 redirects by default, which is correct for most situations. If you need a 302 redirect, you'll need to implement it at the theme level using Liquid code.

Pro Tip

When in doubt, use a 301 redirect. The vast majority of redirect needs in ecommerce are permanent. Using a 302 when you should use a 301 means search engines won't pass the full SEO value to your new URL.

Creating Redirects in Shopify

Shopify makes it straightforward to create redirects through the admin panel. Here's the step-by-step process for creating individual redirects.

Step-by-Step Instructions

  1. 1
    Navigate to URL Redirects

    In your Shopify admin, go to Online Store → Navigation → View URL redirects (at the top of the page).

  2. 2
    Click "Create URL redirect"

    This opens the redirect creation form where you'll enter the old and new URLs.

  3. 3
    Enter the "Redirect from" path

    Enter only the path, not the full URL. For example, use /products/old-product not https://yourstore.com/products/old-product.

  4. 4
    Enter the "Redirect to" path

    Enter the destination path. This can be a product, collection, page, or even an external URL.

  5. 5
    Save the redirect

    Click "Save redirect". It takes effect immediately. Test it by visiting the old URL.

Important URL Format Rules

  • Always start paths with a forward slash: /products/example
  • Don't include your domain name in the paths
  • Paths are case-sensitive, so /Products/Example is different from /products/example
  • You can redirect to external URLs by using the full URL as the destination

Bulk Redirects

When migrating to Shopify or restructuring your store, you may need to create hundreds or even thousands of redirects. Doing this one at a time would be incredibly tedious. Fortunately, Shopify supports bulk redirect imports via CSV.

Creating Your CSV File

Your CSV file needs two columns: "Redirect from" and "Redirect to". Here's an example:

Redirect from,Redirect to
/old-product-url,/products/new-product-url
/category/summer,/collections/summer-collection
/about-us.html,/pages/about
/articles/old-post,/blogs/news/new-post

Importing the CSV

  1. 1
    Go to URL Redirects

    Online Store → Navigation → View URL redirects

  2. 2
    Click "Import"

    Select your CSV file from your computer.

  3. 3
    Review and confirm

    Shopify will show you a preview. Check for any errors before confirming the import.

Pro Tip

Before a migration, crawl your old site with a tool like Screaming Frog to get a complete list of URLs. This ensures you don't miss any pages that need redirects. Map each old URL to its new equivalent before launching.

Common Redirect Scenarios

Here are the most common situations where you'll need to create redirects, along with the recommended approach for each.

Deleted Products

When you delete a product, redirect its URL to a similar product or the relevant collection. This prevents customers from landing on a 404 page.

/products/summer-dress-blue/collections/summer-dresses

Platform Migration

When migrating from another platform, URL structures often change. Map every old URL to its new Shopify equivalent to preserve SEO rankings.

/product/SKU123/products/product-name

/category/clothing/collections/clothing

Collection Restructuring

When reorganising your collections, redirect old collection URLs to their new locations to maintain any SEO value they've built.

/collections/mens-clothing/collections/men

Changing Product Handles

If you change a product's URL handle for SEO purposes, Shopify automatically creates a redirect from the old URL to the new one. No manual action needed.

Note: This only works when editing the handle within Shopify. If you delete and recreate a product, you'll need to create the redirect manually.

Redirect Best Practices

Follow these best practices to ensure your redirects work effectively and don't cause SEO problems.

Do's

  • Redirect to relevant pages: A redirect from a deleted blue dress should go to similar dresses, not your homepage.
  • Create redirects before deleting: Set up the redirect first, then delete the old page.
  • Test your redirects: After creating redirects, verify they work by visiting the old URL.
  • Keep a redirect log: Document all redirects for future reference.
  • Include query parameters if needed: If your old URLs had parameters, include them in your redirects.

Don'ts

  • ×Avoid redirect chains: A → B → C wastes crawl budget and slows down users. Redirect A directly to C.
  • ×Don't create redirect loops: A → B → A will cause errors and broken pages.
  • ×Don't redirect everything to the homepage: This provides poor user experience and minimal SEO benefit.
  • ×Don't keep unnecessary redirects forever: After a year or two, most old URLs have lost their value. Clean up periodically.

Troubleshooting Redirects

Sometimes redirects don't work as expected. Here are common issues and how to resolve them.

Redirect Not Working

Cause: Usually a formatting issue with the URL paths.

Solution: Check that both paths start with a forward slash and don't include the domain. Clear your browser cache and try again.

Redirect Chain Detected

Cause: The destination URL has its own redirect, creating A → B → C.

Solution: Update the original redirect to point directly to the final destination.

Too Many Redirects Error

Cause: A redirect loop exists where URLs redirect in a circle.

Solution: Search your redirects for the affected URL and fix the loop. Use a redirect checker tool to trace the full chain.

Redirect Works in Browser but Google Shows Old URL

Cause: Google hasn't recrawled the page yet.

Solution: Use Google Search Console to request indexing of the new URL. It can take days or weeks for Google to update its index.

Next Steps

With your redirects in place, here's how to maintain them and continue improving your store's SEO health.

  1. 1
    Monitor for 404 errors

    Use Google Search Console's Coverage report to identify pages returning 404 errors that need redirects.

  2. 2
    Audit redirect chains quarterly

    Use a tool like Screaming Frog to identify redirect chains and consolidate them.

  3. 3
    Clean up old redirects

    After 1-2 years, assess whether old redirects are still receiving traffic. Remove those that aren't.

Need Help With Redirects?

Whether you're migrating platforms or restructuring your store, our team can handle your redirect strategy to preserve your SEO rankings.