URL Mappings Guide: Master 301 & 302 Redirects

URL Mappings Guide: Master 301 & 302 Redirects

By Michael Thompson

December 2, 2024 at 04:44 AM

Understanding URL Redirects

URL redirects forward traffic from inactive pages to active ones, ensuring visitors don't encounter broken links. There are two main types of redirects:

301 (Permanent) Redirects:

  • Used for permanent URL changes
  • Transfers search engine rankings to new pages
  • Ideal for changed URLs, deleted pages, or domain changes
  • Original URL must not exist, and new URL must be active

302 (Temporary) Redirects:

  • Used for temporary URL changes
  • Maintains original page rankings
  • Perfect for seasonal content or temporary updates
  • Common for rotating store offerings

Creating URL Redirects:

  1. Open Developer tools panel
  2. Click URL mappings
  3. Add redirects using proper formatting
  4. Click Save

Basic Redirect Format:

/old-url -> /new-url 301

Collection Page Redirect Format:

/old-collection/[name] -> /new-collection/[name] 301

Important Guidelines:

  • Keep consistent capitalization
  • Avoid ?, &, or # symbols
  • Place specific redirects above broader ones
  • 400 KB limit (approximately 2500 redirect lines)
  • Redirects only work if original page is deleted/disabled
  • Can't redirect from homepage (/)

Common Use Cases:

  1. Changed Page URLs:
/about -> /team 301
  1. Deleted Pages:
/history -> / 301
  1. Seasonal Content:
/summer-sale -> /fall-sale 302
  1. External Domains:
/fundraiser -> https://external-site.com 301

Troubleshooting:

  • Verify redirect formatting
  • Ensure destination pages are active
  • Check for redirect loops
  • Confirm proper redirect type (301 vs. 302)
  • Monitor character limits and syntax

For RSS feeds, remove query parameters from original URLs:

/feed -> /new-feed 301

Remember to regularly clean up inactive redirects and prioritize specific redirects over broader ones for optimal performance.

Related Articles

Previous Articles