Server & Network

Redirect Generator

Create redirects for Apache (.htaccess), nginx, PHP and IIS – for individual pages, whole folders, a domain move or HTTPS & www. With checks for loops and chains and a test that plays through every address step by step.

  • Runs entirely in your browser
  • No data upload
  • No sign-up
  • Free

What should be redirected?

Redirects

Tip: A * at the end is a wildcard – /blog/* → /magazine/* redirects all pages under /blog/ and keeps the rest of the address. Instead of a path you can also paste the full URL.

Checks

    Code for your server

    
              

    Test a redirect

      Paste list

      One redirect per line: old and new address, separated by a tab (straight from Excel), semicolon, comma, space or ->. Optionally followed by the status (301, 302, 307, 308, 410). Redirect 301 /old /new lines from an .htaccess are recognised too.

      Guide

      How it works

      1. Choose the type

        “Individual pages” for renamed or deleted pages, “Domain move” for a new domain, “HTTPS & www” for one consistent address of your website.

      2. Enter addresses

        Enter the old and new address – a path or a full URL. Paste long lists straight from Excel or a CSV file with “Paste list”. A * at the end redirects a whole folder.

      3. Check and test

        The checks warn about infinite loops, chains and duplicate entries. Under “Test a redirect” you can see where an address leads step by step.

      4. Install

        Choose your server, copy the code and paste it at the indicated place. Then open an old address in the browser – ideally in a private window, because browsers cache 301 redirects for a long time.

      FAQ

      Frequently asked questions

      What is the difference between 301, 302, 307 and 308?

      301 and 308 are permanent: search engines replace the old address with the new one and transfer the ranking. 302 and 307 are temporary, the old address stays in the index – e.g. for a promotion or maintenance. 307 and 308 additionally require the request method to stay the same (so a form is sent via POST again). For normal pages, 301 is the usual choice.

      When do I use 410 instead of a redirect?

      When a page is removed without replacement and there is no suitable new page. Redirecting everything to the home page is often treated as a “soft 404” by search engines. With 410 (“Gone”) the page disappears from the index faster than with 404.

      Why is a redirect created with mod_rewrite and not with “Redirect 301”?

      “Redirect 301 /old /new” also applies to all addresses that start with /old – /old-prices would become /new-prices. The generated RewriteRules, on the other hand, match exactly the given address and can also check parameters such as ?id=17.

      What is a redirect chain?

      When /a points to /b and /b continues to /c. Every additional hop costs loading time, and Google only follows a limited number of redirects. It is better to let /a point directly to /c – the checks show such chains.

      Are parameters such as ?utm_source kept?

      With “Keep parameters” yes – they are appended to the new address unless the target has parameters of its own. Redirects that check for a specific parameter (e.g. /product.php?id=17) always drop the old parameter.

      Does a redirect with HTML or JavaScript work the same way?

      Not quite. No real status code is sent, and without JavaScript nothing happens at all. Google usually recognises an immediate meta redirect, other search engines do not always. It is only a stopgap if you have no access to the server.

      My redirect does not work – what can I do?

      Check whether mod_rewrite is enabled and .htaccess files are allowed (AllowOverride). If there are already rules in the file, e.g. from WordPress, the redirects belong before them. And test in a private window: browsers remember 301 redirects for a very long time.