URL Redirect Generator

How the network works:

Enter your old URL and new url, choose a redirect type and get correct and ready to paste code for your platform (Apache, Nginx, PHP, HTML or WordPress). Even a single wrong character in the redirect code that you write can cause your site to crash or generate an endless redirect loop. This tool always produces syntax-checked code.

Redirection Rule Settings

Pathways Mapping

Status & Environment Settings

Generated Code

Apache

What This Tool Does

This generator is used to get the correct redirect code from a source URL to a destination URL, all for any site that happens to be running on any platform.

  • Apache (.htaccess) — you can use mod_alias (Redirect) or mod_rewrite (RewriteRule) in the .htaccess file as you require.
  • This is no longer required with Nginx, as it supports rewriting web requests or returning them in your server block.
  • If a site doesn't have access to server configuration, it can be redirected from PHP — a header("Location: ...") redirect for sites without server config access.
  • For use if server-side redirects are not truly possible HTML meta refresh should be used.

Redirect config formats are different for each platform: WordPress, Next.js, Vercel, Netlify, Cloudflare Pages.

Select the type of redirect (301 or 302 — most often), type your URLs and let the tool write the syntax for you — no need to memorize the order of apache regexs or Nginx directives.

How to Make a Redirect (Three Steps)

  1. Enter your source and destination URLs. The source is the old page that people (and search engines) are now landing on and the destination is where they should be landing instead.
  2. Choose your redirect type and platform. Choose 301 for permanent or 302 for temporary and then pick the platform your site is on.
  3. Copy the code into place. Copy it into your platform config, PHP file, nginx.conf, or .htaccess file — then try it before putting it into production.

301 vs. 302 (and When to Use 307/308 Instead)

This is the number one redirect redirection error, and has very tangible SEO impacts: A bad redirect status code can make you lose ranks without you realizing it during a redirect.

Code Meaning Passes SEO Value? Use When
301 Moved Permanently Yes No more old URL: page moved, site restructured, domain changed.
302 Found (Temporary) Not intended to A short term change: A/B testing, maintenance page, seasonal redirect
307 Temporary Redirect (strict) Not intended to Strictly follows the original method of the request (e.g., POST remains POST) same as 302, but this is more strict.
308 Permanent Redirect (strict) Yes Preserves the original request method like 301 does, but is a more strict version.

The rule of thumb for all such cases is that if the old URL is dead, use 301 — this will pass the ranking signals on to the new one for search engines. A popular error is using 302 for a permanent move, which can cause the old and now-dead URL to be indexed rather than the new one as 302 tells search engines "this is temporary, keep checking back.

Common Redirecting Pitfalls that lead to serious issues

  • Redirect loops. Page A redirects to Page B, which redirects to Page A — eventually, browsers will limit their redirects and throw up a "Too many redirects" error. This is frequently the case when HTTPS, www, and trailing-slash rules are applied on one-by-one basis without any cross-checking.
  • Redirect chains. A redirects to B, which redirects to C, which redirects to D. Every "hop" has latency and reduces some SEO value along the way — always use the "true" final URL that will contain the extra redirect.
  • Moving at 302 houses – Permanent move. This is the most popular error that is often made with status-codes and it's a quick one to make if you don't look at the dropdown.
  • Query string handling. Other redirection methods will ignore query strings unless you've configured them to do otherwise (such as capturing a query string, like ?ref=email, that you'd like to keep when you redirect).
  • Syntax error in .htaccess file. The two can cause a full server error (500) instead of a failed redirect, so always test these .htaccess changes on staging before pushing them live — a missing bracket and malformed RewriteRule can cause a full server error.
  • Case sensitive mismatches between /Old-Page and /old-page — these might be different rules depending on your server configuration, so check to be sure you're getting an expected redirect.

Frequently Asked Questions

Will 301 redirect affect my SEO?

NO — a 301 redirect is the way the search engines expressly ask for site migration and changing the URL — it is meant to pass along ranking signals from the old page to the new page, not abandon them.

What does the number 301 have to do with SEO and what does the number 302 have to do with SEO?

A 301 means a permanent redirect and search engines tend to accumulate ranking signals on the redirecting URL. A 302 indicates a temporary redirect and search engines do not usually de-index the original URL, meaning that they may still rank it even if you change its permanent URL to 302.

In order to enable a redirect, do I need server access?

Not always — if you have access to your .htaccess file (Apache) or nginx.conf (Nginx) you can create server level redirects there. If that is not possible, many PHP-based redirects work or you could use your CMS/platform redirect settings, such as WordPress redirect plugins, or Netlify's _redirects file.

What is the advantage of using HTML meta refresh versus a server side redirect?

Meta refresh redirects are browser-based and do not require access to the server, so they can be used as a safeguard when you actually can't access the server configuration, such as some static websites or controlled CMS setups. They are not as efficient or as SEO friendly as a real 301 redirect on the server, and should be used only as a last resort, rather than a first choice.

How can I determine if my redirect is working?

However, verify that the HTTP response contains the expected status code (301 or 302), along with a Location header that indicates the new location of the page, which should be the old URL when the redirect is permanent (301), and the new URL when the redirect is temporary (302), by using a command like curl -I against the old URL.

Is there a way to use one redirect rule for an entire folder rather than using each redirect rule for each page?

Yes — when a whole section of a site has moved, you can easily redirect an entire directory structure using a pattern-based rule (like the RewriteRule in Apache or the rewrite directive with a regexp in Nginx) instead of creating one line for each URL.

Do query strings and parameters get passed through with redirect?

This will depend on the redirect type, as some will store query string by default, while others will not unless specifically set to forward or store them. If your old URLs include parameters that you do need to pass on (such as filter or tracking parameters), check how they will be passed through to the new URL before assuming that it works.

What is the number of times a browser can bounce before it stops bouncing?

Most browsers limit redirect chains to 20+ redirects, but in reality 2-3 chained redirects will already slow down the load time, and will dilute the SEO value of the page — never use more than one redirect from old URL to final URL.

Share This Tool

Browser Extension

Get quick access to remove the gemini watermark from the image and video directly from your browser toolbar.