Skip to the content

Free generator, runs in your browser

Redirect Generator for Apache, Nginx, Next.js, Vercel, Netlify and Cloudflare

Paste a list of old and new urls and get redirect rules for your server or platform. The generator flattens chains, catches loops and duplicates, and handles wildcards.

Generate redirects

One redirect per line: old path, new url, and an optional status code.

One per line: the old path, the new path or address, and an optional status. Paste hundreds at once.

.htaccess

    Why use the Redirect Generator

    Six platforms

    Apache .htaccess, Nginx, Next.js next.config.js, vercel.json, Netlify _redirects and Cloudflare _redirects.

    Bulk import

    Paste hundreds of lines from a spreadsheet, separated by spaces, tabs, commas or arrows.

    Chains and loops

    A to B and B to C becomes A to C. Loops and conflicting duplicates are flagged before they reach your server.

    Wildcards

    Redirect a whole folder with /old/* and keep the rest of the path with :splat.

    When to use the Redirect Generator

    Site migrations

    Map every old url to its new home in one go.

    Url clean ups

    Move pages to shorter or clearer urls without losing links.

    Platform moves

    Translate the redirects of one host into the syntax of another.

    Merged content

    Point retired articles at the page that replaces them.

    Campaign urls

    Create short vanity urls that redirect to landing pages.

    Folder moves

    Redirect /blog/* to /news/* with one rule.

    Understanding Redirect

    How to use the generator

    1. 1Paste. One redirect per line: /old-page /new-page, optionally followed by 301, 302, 307 or 308.
    2. 2Pick the platform. The rules switch to that platform's syntax.
    3. 3Fix what is flagged. Loops and duplicates are listed under the output.
    4. 4Deploy and check. Deploy the rules, then run the redirect checker on a few old urls.

    301, 302, 307 or 308

    Use 301 or 308 for a permanent move. Search engines pass the signals of the old url to the new one. Use 302 or 307 for a temporary one. 307 and 308 keep the request method, which matters for forms and apis.

    Avoid chains

    Each extra hop slows visitors down and crawlers may stop following after a few. When you redirect a page that was itself a redirect target, update the old rule to point at the final url. The generator does this for you.

    Privacy

    The generator runs entirely in your browser. Nothing you type is sent to Aback or anywhere else, and your last input is kept in this browser so a reload does not lose it.

    Frequently asked questions

    Which status code should I use for SEO?

    301 or 308 for permanent moves. Both pass ranking signals to the new url.

    Where does the .htaccess code go?

    In the .htaccess file at the root of the site, or in the virtual host. It needs mod_rewrite, which almost every host has.

    Where do the Nginx rules go?

    Inside the server block of the site. Reload Nginx after the change.

    Can I redirect query strings?

    Apache, Nginx, Next.js and Vercel can match a query string. Netlify and Cloudflare _redirects match the path only, and the tool warns when a rule needs more.

    How many redirects can Cloudflare handle?

    A _redirects file takes up to 2,000 static and 100 dynamic redirects. For more, use Bulk Redirects.

    Should I redirect every old url to the home page?

    No. Redirect each url to the most relevant new page. Mass redirects to the home page are treated like missing pages.

    How do I test the redirects?

    Run the redirect checker on the old urls. It follows every hop and reports the status codes.

    ↑ ↓ to move↵ to openesc to close