SEO Stack Hub Use Free Tools

Free 301 Redirect Generator

When a page moves, a 301 redirect sends visitors and most of the link value to the new address. This tool turns a list of old paths and new URLs into ready-to-paste redirect rules for Apache (.htaccess) or Nginx.

Frequently asked questions

When should I use a 301 redirect?

When a page has moved permanently, such as a new URL, a merged article or a domain change. It sends visitors and most link value to the new page.

Apache or Nginx?

Most shared WordPress hosting uses Apache (.htaccess). If you are not sure, ask your host or use a redirect plugin.

Can redirects hurt SEO?

Chains of many redirects slow pages down. Point old URLs straight to the final URL.

More free SEO tools

See all 27 free tools →

How to use the 301 Redirect Generator

  1. Enter one redirect per line: old path, new URL.
  2. Choose your server type.
  3. Click Generate rules.
  4. Paste the rules into .htaccess or your Nginx config, then test each old URL.

301, 302 or 410: which status code do you need?

Use a 301 (moved permanently) when a page has a new permanent address, for example after changing a slug, merging two articles or moving from HTTP to HTTPS. Use a 302 (found) or 307 only when the move is temporary, such as a short promotion page or maintenance. If a page is gone for good and there is no close replacement, a 410 (gone) or a plain 404 is more honest than redirecting it somewhere unrelated.

Google has said that 3xx redirects do not lose PageRank, so a correct 301 to a closely matching page keeps most of the value the old URL earned. Redirecting dozens of unrelated pages to the homepage is different: Google usually treats those as soft 404s, so the old links stop helping.

What the generated rules look like

For Apache, the simplest rule for one page is:

Redirect 301 /old-page/ https://example.com/new-page/

If your .htaccess already uses mod_rewrite (WordPress does), a rewrite rule placed above the WordPress block gives you more control:

RewriteEngine On
RewriteRule ^old-page/?$ https://example.com/new-page/ [R=301,L]

For Nginx, add a location block inside the server block and reload Nginx:

location = /old-page/ {
    return 301 https://example.com/new-page/;
}

A worked example

Say you rename three blog posts and merge two thin guides into one. Your input would be five lines, each with the old path and the new full URL. The generator returns five rules. Paste them into .htaccess above the line # BEGIN WordPress, save, and open each old URL in a private browser window. Each one should land on the new page in a single hop.

How to test your redirects

  1. Run curl -I https://example.com/old-page/ in a terminal. The first line should show 301 and the Location header should show the new URL.
  2. Check that the destination itself returns 200, not another redirect.
  3. In Google Search Console, inspect the old URL. After the next crawl it should report the page as a redirect.
  4. Update internal links so they point straight at the new URL instead of relying on the redirect.

Common mistakes to avoid

Frequently asked questions

Can I redirect a whole folder?

Yes. In Apache, RedirectMatch 301 ^/old-folder/(.*)$ https://example.com/new-folder/$1 keeps the rest of each path. Test a few URLs afterwards.

Do redirects slow down my site?

One hop adds a small delay for the visitor. Chains add more, which is another reason to keep every redirect to a single step.

Does this tool change my server?

No. It only writes text in your browser. Nothing is applied until you paste the rules into your own configuration.

Black FridayOrder 5 websites and get 1 guest post freeEnds Nov 30Order now
SEO Stack Hub was founded by Zahid Butt.