301 Redirect Generator

Move or rename pages without losing SEO. This free 301 redirect generator creates ready-to-paste redirect rules for Apache (.htaccess) and Nginx, so old URLs send visitors and ranking signals to the right new page.

How to use the redirect generator

Pick your server, then add one row for each redirect: the old path and the new destination URL. Copy the generated rules into your .htaccess file (Apache) or server block (Nginx). A 301 is a permanent redirect, which passes the large majority of ranking signal to the new URL.

Choosing the right status code

A redirect is only as good as the code it returns, because the code is what tells a crawler whether the move is permanent. The five worth knowing:

  • 301 Moved Permanently is the default for anything that has moved for good. Search engines transfer signals to the new address and eventually replace the old URL in their index.
  • 308 Permanent Redirect means the same thing as a 301 but preserves the original request method, which matters for form submissions and API endpoints.
  • 302 Found is temporary. Use it for split tests, seasonal pages and maintenance detours, where the original URL is coming back. The old address stays indexed.
  • 307 Temporary Redirect is the method-preserving equivalent of a 302.
  • 410 Gone is not a redirect at all, but it is the correct answer when a page has been removed and has no successor. It gets the URL dropped from the index faster than a 404 does.
Preview of the 301 Redirect Generator with Old URL and New URL fields and a Rules result

Common redirect mistakes

Redirects are simple individually and difficult in bulk. These are the faults that show up in almost every migration audit:

  • Chains. Every additional hop adds latency and risk. Rewrite the rules so each old URL points straight at its final destination rather than via two or three intermediates.
  • Loops. A rule sending A to B while another sends B to A makes both pages unreachable. Test every rule against live URLs before deploying it.
  • Redirecting everything to the homepage. A bulk redirect of retired pages to the root is usually treated as a soft 404, and none of the signals carry across.
  • Mismatched destinations. The target should answer the same need as the original page. A redirect to something unrelated loses most of its value.
  • Rules that are never retired. Redirect files grow into thousands of lines and slow every request. Audit periodically and remove rules whose source URLs no longer attract traffic or links.
  • Using a temporary code for a permanent move. That keeps the old URL indexed indefinitely and splits signals between the two addresses.
Illustration: a scan beam auditing a web page, with a checklist of passes, warnings and a ready-made fix

Frequently asked questions

What is a 301 redirect?

A 301 is a permanent redirect that sends users and search engines from an old URL to a new one. It is the correct choice when you move or rename a page and want to keep its rankings.

301 vs 302: which should I use?

Use 301 for permanent moves — it passes ranking signals. Use 302 only for temporary changes where you intend to restore the original URL.

Where do I add Apache redirect rules?

In the .htaccess file in your site’s root directory. For Nginx, add the rules to the relevant server or location block and reload the configuration.

A single, relevant 301 passes effectively all of it, and Google has stated for years that no ranking signal is lost through a permanent redirect. The losses come from everything around it. Each extra hop in a chain adds latency and another chance for a rule to break, and a redirect pointing at a page that does not match the original intent is frequently treated as a soft 404, which passes nothing at all. Keep every redirect to a single hop and send it to the closest equivalent page.

See your site’s full SEO score — free.Instant audit, 10 checks, no signup to see it.
Run free audit →
Free tools →My toolkit →Locations →Comparisons →
Verified Agent-Ready by DigiJaws
See who AI recommends instead of you — free AEO audit, 90-day plan you keepGet my free audit