Skip to content
SEO Madmanby Adam Hafez
Free tool

Redirect map generator: CSV, .htaccess and Nginx

Redirect map generator for site migrations: map old URLs to new and export CSV, .htaccess Redirect 301 or Nginx rewrite rules. Free, runs in your browser.

Runs entirely in your browser. Nothing you enter is uploaded, logged or stored.

    0 URLs mapped

    Key takeaways

    • Google's site-move documentation recommends mapping every old URL to its closest real equivalent on the new site rather than to one catch-all destination.
    • Redirecting many old URLs to an irrelevant single destination, such as the home page, can confuse users and may be treated as a soft 404 error by Google.
    • Google recommends server side permanent redirects, such as HTTP 301 or 308, for a permanent site move rather than temporary redirects.
    • Google advises keeping redirects in place for as long as possible, generally at least one year.
    • The Apache and Nginx outputs use paths only, so a move to a new domain needs the new host added to each target.

    What it takes

    • An old URL or path for every page that existed before the migration
    • The new URL or path that page now lives at

    More tools

    All of them free, all of them browser-only.

    Browse the tools

    How to use it

    1. 1List every old URL that needs a redirectPull the full list from your old sitemap, server logs or a crawl, not just the pages you remember. A migration that skips indexed but low-traffic URLs leaves crawl paths that resolve to a 404.
    2. 2Map each old URL to its closest real equivalentPoint each row at the page that actually replaced it, not the homepage or a generic category page. Google's own site-move documentation treats a mass redirect to one irrelevant destination as a soft 404 risk.
    3. 3Watch the mapped count and the warningsThe tool counts total mapped URLs live and flags duplicate old URLs, empty fields, and too many rows pointing at the homepage as you type.
    4. 4Choose the output format for your serverSwitch the tab to CSV for a spreadsheet or migration ticket, Apache for a .htaccess file, or Nginx for a server block, then copy the generated block.
    5. 5Deploy permanent redirects, not temporary onesGoogle recommends server side permanent redirects, HTTP 301 or 308, for a permanent site move. A temporary 302 tells search engines the old URL might come back, which slows how quickly they update their index.
    6. 6Validate the redirects after launchCrawl the old URL list against the live site once redirects are deployed to confirm every row resolves to a 200, and watch Search Console for unexpected 404s in the weeks after.

    A site migration succeeds or fails on its redirect map more than on almost anything else. This redirect map generator builds one against Google’s documented rules: enter old and new URLs, read the warnings, then export the format your server reads. Every field stays in your browser.

    What the builder checks

    Google’s site move documentation asks you to map every old URL to its new destination, and warns against redirecting “many old URLs to one irrelevant single URL destination, such as the home page”. As you type, the tool checks:

    • Empty fields. Any row missing its old or new URL is listed and left out of the output.
    • Homepage dumping. If more than two complete rows point at /, /index.html or /home, it warns that Google may treat the redirects as soft 404s.
    • Duplicate old URLs. An old path that appears in two rows, since each old URL can only go to one place. Full URLs and paths are compared as paths.
    • Missing leading slash. An old URL like old-page with no slash and no scheme, which Apache and Nginx do not accept as a path.

    A live count shows how many complete rows are mapped.

    How to read the results

    A green “No issues found in this map.” means every row is complete and none of the checks fired. Each amber line names the row or path to fix. The warnings do not stop the export, so read them before you copy.

    The three outputs are:

    • CSV: old_url,new_url with your values exactly as typed, for a spreadsheet or ticket.
    • Apache (.htaccess): Redirect 301 /old /new, the mod_alias form, one line per row.
    • Nginx: rewrite ^/old$ /new permanent;, where the anchors match the exact path and permanent returns a 301.

    Worked example

    The tool opens with three rows: /blog/old-post to /articles/old-post, /products/widget.html to /products/widget, and /about-us to /about. It reports “3 URLs mapped” and “No issues found in this map.” The Apache tab produces:

    Redirect 301 /blog/old-post /articles/old-post
    Redirect 301 /products/widget.html /products/widget
    Redirect 301 /about-us /about

    and the Nginx tab produces:

    rewrite ^/blog/old-post$ /articles/old-post permanent;
    rewrite ^/products/widget.html$ /products/widget permanent;
    rewrite ^/about-us$ /about permanent;

    Point three of the rows at / and a warning appears: “3 URLs redirect to the homepage.”

    Mistakes it catches, and misses

    • Sending retired pages to the homepage. Map each to its closest real equivalent, or to the one new page that now covers it.
    • The same old URL mapped twice. Usually two people editing one sheet. The server obeys the first matching rule; the other row is dead.
    • Relative paths without a slash. Easy to paste from a spreadsheet, rejected by the server.

    The one it cannot catch is a domain change. The Apache and Nginx outputs strip the host from the new URL too, so each target resolves on the server answering the request. Apache and Nginx both accept a full URL as the target, so for a move to a new domain, add the new host to each target before you deploy.

    Apache’s Redirect also matches by prefix: its documentation says extra path information beyond the matched path is appended to the target. List more specific paths first.

    After launch, Google advises keeping the redirects for at least one year and replacing internal links with the new URLs. How long recovery takes is shown by a Search Engine Journal study of 892 domain migrations, which found an average of 523 days for the new domain to match the old one’s organic traffic.

    Sources

    1. 1.Site moves with URL changes - Google Search CentralPrimary
    2. 2.mod_alias: Redirect directive - Apache HTTP Server ProjectPrimary
    3. 3.Module ngx_http_rewrite_module - nginxPrimary
    4. 4.How Long Should an SEO Migration Take? [Study] - Search Engine Journal

    Frequently asked questions

    Can I redirect all my old pages to the homepage?

    Google's site-move documentation says not to redirect many old URLs to one irrelevant destination such as the home page, because it can confuse users and may be treated as a soft 404. Redirecting several old pages to one new page that now covers all of them is fine.

    Should a migration use 301 or 308 redirects?

    Google recommends server side permanent redirects, such as 301 or 308, for a permanent move. This tool writes 301s: Apache's Redirect 301 and the Nginx permanent flag, which the Nginx documentation says returns a 301.

    How long should I keep the redirects?

    Google's site-move documentation says to keep them for as long as possible, generally at least one year, so it can transfer signals to the new URLs. Keeping them indefinitely is better for users who still follow old links.

    Why are my full URLs turned into paths?

    Apache's Redirect directive needs the old location as a path starting with a slash, so the tool strips the scheme and host before writing the Apache and Nginx lines. The CSV keeps exactly what you typed. If the new URL is on a different domain, put the full new URL back as the target, since both servers accept an absolute URL there.

    Does Apache Redirect also move subpages?

    Yes. Apache's documentation says additional path information beyond the matched path is appended to the target, so Redirect 301 /about-us /about also sends /about-us/team to /about/team. Query strings are carried over too. Put more specific rules first, or use RedirectMatch if you need an exact match.

    Tools

    humans.txt generator

    humans.txt generator: build a humans.txt file with TEAM, THANKS and SITE sections from the humanstxt.org template. Free, runs in your browser.