Skip to content

Redirect Generator

Turn old and new URLs into ready-to-paste redirect rules.

How to use the redirect generator

Three steps, all in your browser.

  1. 1

    List the moves

    Enter each old URL with the new URL it should go to.

  2. 2

    Set the rules

    Add rules or URLs. The result updates instantly.

  3. 3

    Copy the result

    Copy what you need in one click. Nothing is saved or sent anywhere.

Redirect Generator: what to know

When a page moves, a server-side redirect sends visitors and crawlers from the old URL to the new one. The redirect generator turns a list of old and new URLs into redirect rules for Apache (.htaccess), Nginx and several popular hosting platforms and frameworks, as permanent (301, 308) or temporary (302, 307) redirects, ready to paste into your configuration. It can also write whole-site rules, such as forcing HTTPS, choosing www or not, and moving to a new domain.

The status code tells search engines how to treat the move. A 301 or 308 is a strong signal that the new URL should replace the old one in the index, and signals such as links are consolidated there. A 302 or 307 is a weak signal, used when the old URL will come back. Google follows up to 10 redirects in a chain, but each hop adds delay, so every old URL should point straight at its final destination.

For a migration, map each old URL to its closest equivalent, not to the home page: mass redirects to the home page are often treated as soft 404s. Keep redirects in place for at least a year, and ideally for good, since links and bookmarks to the old URLs keep arriving. Test a sample of rules on a staging server before you go live; a misplaced rule can create loops.

Popular uses

  • Mapping old URLs to new ones in a site migration
  • Redirecting renamed blog posts and products
  • Consolidating duplicate pages into one
  • Moving pages between sections of a site

Tips for the best result

  • Export old URLs from your sitemap or analytics so none are missed.
  • Update internal links to the new URLs too, rather than relying on redirects.
  • After launch, check Search Console for 404s you didn't redirect.

Learn more

Read how JustYourSEO works and our privacy details. Text, HTML and images you use here are processed in your browser and are never sent to our server.

Frequently asked questions

Use 301 (or 308) when a page has moved for good: Google treats it as a strong signal to index the new URL. Use 302 (or 307) only when the old URL will come back, such as during a short promotion.

Google recommends at least a year, and keeping them indefinitely is best when you can, since links and bookmarks to old URLs keep working.

No. Redirect each old URL to the closest equivalent page. Mass redirects to the home page are often treated as soft 404s, so the old pages' signals are lost.

No. The text, HTML, files and images you paste or open are processed on your device and are not sent to our server or stored. The five URL tools (SEO audit, indexability checker, redirect checker, HTTP header checker and broken link checker) are the exception: they send the URL you enter to our server, which requests that public page (and, for the broken link checker, each link on it) and returns what it received to your browser to check. The URL and the page aren't stored or logged. The optional Import from URL in the meta tag, Open Graph and Twitter card generators works the same way.

Yes. Every tool is free with no sign-up and no limits on use. Clearly labeled ads keep it that way.

They help you get the details right: tags that are complete and valid, previews that read well, files crawlers can parse. No tool can guarantee rankings; those depend on your content, your site and how search engines evaluate them.