How to Set Up URL Redirects and Mappings
URL redirects send visitors from inactive pages to active ones, using either permanent (301) or temporary (302) redirects. Here's how to effectively manage URL mapping on your site:
301 vs 302 Redirects
301 Redirects (Permanent):
- Transfers search engine ranking from old to new page
- Use when permanently changing URLs, deleting pages, or moving to different domains
- Original URL must no longer exist
302 Redirects (Temporary):
- Maintains original page's search ranking
- Use for seasonal changes or temporary page updates
- Original page retains its SEO value
Creating Redirects
- Access URL Mappings in Developer Tools
- Add redirects using proper format:
- Old URL
- Arrow symbol (->)
- New URL
- Redirect type (301 or 302)
Example format:
/old-url->/new-url 301
For collection pages (blogs, products, events):
/old-blog/[name]->/new-blog/[name] 301
Important Considerations:
- Limited to 2500 redirect lines (400kb)
- Higher redirects take priority
- Source page must be deleted or disabled
- Only works with integrated custom domains
- Cannot redirect image/file URLs
- Cannot redirect away from homepage (/)
Common Use Cases
301 Redirects:
- Changed page URLs
- Deleted pages
- Imported content
- Domain changes
302 Redirects:
- Seasonal content
- Temporary page updates
- Rotating promotional pages
Troubleshooting
Common errors:
- "Invalid mapping: Not enough parts" - Missing arrow or redirect type
- "Invalid mapping: Too many parts" - Unnecessary elements included
- "Invalid mapping: Expected 301 or 302" - Incorrect redirect type
- 404 errors - Check for multiple redirects within 2 minutes or disabled target pages
Remember to maintain clean, properly formatted redirects and regularly remove inactive ones to keep your URL mapping manageable.