How to Create and Manage URL Redirects: 301 and 302 Guide

How to Create and Manage URL Redirects: 301 and 302 Guide

By Michael Chen

December 2, 2024 at 03:46 AM

URL mapping allows you to set up redirects that send visitors from old URLs to new ones, preventing broken links and maintaining SEO value. Here's how to implement them effectively:

Types of Redirects

301 Redirects (Permanent)

  • Used for permanent URL changes
  • Transfers SEO ranking to new page
  • Best for:
    • Changed page URLs
    • Deleted pages
    • Domain changes
    • Imported content migrations

302 Redirects (Temporary)

  • Used for temporary URL changes
  • Maintains original page's SEO ranking
  • Best for:
    • Seasonal content
    • Temporary page updates
    • Rotating content

Creating Redirects

  1. Access Developer Tools
  2. Click URL Mappings
  3. Add redirects using this format:
    /old-url->new-url 301
    /old-url->new-url 302
    
  4. Click Save

Important Guidelines:

  • 400KB limit (approximately 2,500 redirects)
  • Higher redirects take precedence
  • Original page must be deleted or deactivated
  • Case-sensitive URLs
  • Avoid special characters (?, &, #)

Common Redirect Examples:

Single Page

/old-page->/new-page 301

Collection Items (Blog, Shop, Events)

/old-blog/[name]->/new-blog/[name] 301
/shop1/[name]->/shop2/[name] 301

External Domain

/page->https://external-domain.com 301

Seasonal Content

/summer-sale->/fall-sale 302
/winter-sale->/spring-sale 302

Troubleshooting:

If you see 404 errors, check:

  • Redirect is properly formatted
  • Destination page is active
  • No redirect loops exist
  • Ajax Loading is disabled (version 7.0)

Error messages indicate:

  • Missing parts (arrow or redirect type)
  • Extra components
  • Invalid redirect types
  • Invalid URL formats

Remember to regularly review and clean up inactive redirects to maintain optimal performance.

Related Articles

Previous Articles