Free tool

301 and 302 redirect generator for .htaccess and Nginx

Paste your old and new URLs, pick 301 or 302, and copy ready-made rules for Apache, Nginx or the WordPress Redirection plugin. The tool flags loops, duplicates and chains.

Separate with a comma, tab or space. Paste straight from a spreadsheet.

Redirect type

    Apache .htaccess

    Nginx

    Redirection plugin CSV

    How to use it

    1. List each old URL and the page it should go to, one pair per line.
    2. Choose 301 for permanent moves (almost always) or 302 for temporary ones.
    3. Copy the rules for your server: .htaccess for Apache or LiteSpeed (most shared hosting), Nginx for VPS or Nginx hosts.
    4. On WordPress you can skip server files: save the CSV output as a .csv file and import it in the free Redirection plugin.
    5. Back up .htaccess first, then test each old URL in a private window after saving.

    Not sure which code to use? Read 301 vs 302 redirects explained.

    FAQ

    Redirect questions

    Should I use a 301 or a 302 redirect?

    Use 301 when a page has moved for good, such as after a redesign, a URL change or merging two posts. Use 302 only for temporary moves, like a short promotion or maintenance, when the old URL will come back.

    Where is the .htaccess file?

    In the root folder of your site on Apache or LiteSpeed hosting, the same folder that holds wp-config.php on WordPress. It is a hidden file, so turn on "show hidden files" in your file manager. Put redirect rules above the # BEGIN WordPress block.

    Does this work for Nginx hosting?

    Yes. Copy the Nginx output into the server block of your site configuration and reload Nginx. On managed hosts without config access, ask support to add the rules or use a redirect plugin.

    Can I redirect full URLs from another domain?

    Yes. The tool reduces old full URLs to their path, because a rule on your server only sees the path. New URLs can be full URLs on any domain.

    How many redirects can I add?

    Hundreds are fine. Avoid chains (A to B to C) by pointing every old URL straight to its final page, and remove loops where a URL redirects to itself.

    Contact

    Let's build your next website

    Available for freelance projects, agency white-label work and long-term maintenance. Feel free to pass this along to your team or company.

    I reply within 24 hours, usually the same day. Your details are emailed to me, then WhatsApp opens so we can chat right away.

    Chat now