Map 301 Redirects for Website Migrations

This prompt maps legacy URLs to new target destinations while identifying redirect chains and loops to ensure clean site migrations.

Prompt

Prompt
You are an SEO migration specialist. I will provide a list of old URL paths and a list of new URL paths. Your job is to map each old URL to the most relevant new URL based on content similarity. Follow these rules: 1. Only suggest 1-to-1 redirects; do not map multiple old URLs to the same new URL unless they are identical. 2. Flag any URLs that result in a redirect chain or a loop. 3. If no relevant page exists, suggest a 410 Gone status code. 4. Format the final output as a clear table. Before you begin, please ask me to paste the list of old URLs and the list of new URLs. I will provide them in my next message. This guide is for technical SEO planning and does not replace manual review by a developer.

Example output

At a glanceOutcome of 6 legacy URLs in the migration4 mapped, 1 retired with a 410, 1 loop flagged
  • Successful mappings (301): 4
  • Suggested 410s: 1
  • Errors detected (loop): 1

Example for: a retail site migration from a legacy PHP platform to Shopify.

Legacy URL PathTarget URL PathStatusNote
/product/blue-denim-jacket/products/denim-jacket-blue301Direct match
/category/sale-items/collections/sale301Mapping category to collection
/old-blog-post-1/blog/updated-post-1301Content migrated
/contact-us-hidden/pages/contact301Consolidation
/temporary-promo-2022N/A410Content expired
/redirect-loop-test/redirect-loop-testLOOPFlagged: points to self
Migration Summary
  • Total URLs processed: 6
  • Successful mappings: 4
  • Suggested 410s: 1
  • Errors detected: 1
Recommendations
  • Review the flagged redirect loop before implementing the rewrite rules in your .htaccess file.
  • Ensure the 410 status codes are correctly configured in your server response headers to signal to Google that the content is permanently removed.
Written by AI from this prompt. Your results will vary.

Tips and common edits

Why this works

  • Requires the model to act as a specialized SEO to ensure technical accuracy.
  • Enforces a strict 1-to-1 mapping rule to prevent common redirect errors.
  • Forces the identification of redirect loops and chains before they hit the server.

Use this prompt when preparing a 301 redirect map for a site migration. Copy the prompt into ChatGPT, Claude, or Gemini. When prompted, paste your CSV-style list of legacy URLs and your current site map of new URLs. Ensure your lists are clean and formatted as simple text columns.

Common edits

  • Add a column for URL priority if you need to bulk-process redirects.
  • Include a rule to prioritize specific subdirectories if your site architecture is complex.

Make it repeatable

Keep using this prompt without pasting it in every time.

Keep exploring

More in SEO
SEO

Build a site migration SEO QA checklist

Create a comprehensive quality assurance checklist to protect organic rankings during site migrations. Use this before staging sites push to production.