How to check redirect maps for errors before migration
Site migrations risk ranking drops from redirect map errors. Manual checks prevent loops, chains, and missing rules. This guide shows how to validate your map without relying on live site crawlers.
Why this is harder than it looks
SEO teams often miss redirect map flaws like self-redirects, conflicting rules, or incorrect status codes. These errors cause 404s, broken user journeys, and ranking losses. Existing tools require live sites or spreadsheet workarounds, leaving gaps in validation.
Step by step
- List all redirect sources. Write every old URL you need to redirect. Use a text editor to copy-paste from your sitemap.xml or CMS export. Ensure no entry is missing by cross-checking with your migration plan. Avoid duplicates by using a spreadsheet's 'remove duplicates' function.
- Check for self-redirects. Look for rules where the source and target are the same. Example: /old -> /old. These create infinite loops that break browsers. Use find/replace to fix by adding a trailing slash or changing the target to a valid page.
- Trace redirect chains. Follow each rule's target to see if it leads to another redirect. A chain like A->B->C wastes server resources. Flatten chains by directly linking A->C. Use a pen and paper or a simple spreadsheet to map all paths visually.
- Validate status codes. Ensure 301 for permanent moves and 302 for temporary. Check config files for syntax like R=301 or [R=301,L]. Replace 302 with 301 unless the move is temporary. Confirm your CMS or server doesn't override these codes.
- Normalize URLs. Standardize case (lowercase), trailing slashes, and protocol (https). Example: /Old-Page becomes /old-page. Remove query parameters unless needed. Use a regex tool to automate this across all rules.
- Check for conflicts. Search for identical sources with different targets. Example: /contact -> /new-contact and /contact -> /old-contact. Keep the correct one and delete duplicates. Use a text editor's 'find all' function to spot conflicts quickly.
- Export and test locally. Save your map as a CSV or config file. Test in a local server environment using tools like XAMPP or Docker. Verify redirects work as expected before deploying. Use browser developer tools to check network requests.
Common mistakes
- Ignoring case sensitivity in URLs
- Failing to standardize trailing slashes
- Overlooking query string differences
- Not testing in a local environment
Where RedirectPreflight fits in
RedirectPreflight is a VS Code extension that checks redirect maps before launch. It reads redirect rules from files such as CSV and .htaccess and flags problems like loops and chains so you can fix them in the editor.
RedirectPreflight support and FAQ
FAQ
Check if the target URL exists on the new site. Verify server configuration isn't overriding your map. Test in a staging environment before live deployment.
Use the Pro version's multi-file merge feature. Split into smaller files if needed, but ensure all sources are covered. Validate each section individually.
301 is permanent - search engines update links. 302 is temporary - links stay in search results. Use 301 for final moves and 302 for short-term changes.