.htaccess & 301 Redirect Generator

Moving pages, changing URLs or switching to HTTPS? List your old and new addresses and get ready-to-use redirect rules for Apache, IIS and ASP.NET, or Nginx.

  • 100% free
  • No sign-up
  • Runs in your browser
Separate the old and new address with a space, tab or comma.
Your code

How to use

How to use the .htaccess & Redirect Generator

  1. List each redirect: the old path, a space, then the new URL.
  2. Choose your server: Apache, IIS (ASP.NET) or Nginx.
  3. Set the redirect type and HTTPS and www options.
  4. Copy or download the rules, add them to your server, and test each old URL.

Private by design. Everything is generated in your browser. Your URLs, content and settings are not uploaded or stored.

About this tool

Why 301 redirects protect your SEO

When a page moves, a 301 redirect tells browsers and search engines that the move is permanent. Visitors land on the right page, and search engines pass most of the old page's ranking signals to the new URL. Without redirects, old links and bookmarks hit a 404 page and the rankings you built are lost.

Which file you need depends on your server. Apache uses .htaccess, Windows servers running IIS and ASP.NET use web.config with the URL Rewrite module, and Nginx uses its server configuration. Use 302 only for genuinely temporary moves, such as a short promotion.

Good to know

Redirect best practice

Redirect to the closest match

Send old pages to the most relevant new page, not always the home page.

Avoid chains

Redirect straight to the final URL rather than through several hops.

Back up first

Save a copy of your existing .htaccess or web.config before editing.

Update internal links

Change links on your own site to point directly at the new URLs.

FAQ

.htaccess & Redirect Generator FAQs

What is the difference between 301 and 302?

A 301 is permanent and passes ranking signals to the new URL. A 302 is temporary and tells search engines to keep the old URL indexed.

My site runs on ASP.NET. Which option should I use?

Choose IIS / ASP.NET (web.config). The rules use the IIS URL Rewrite module.

How long should I keep redirects?

Keep them for at least a year, and ideally permanently for pages with backlinks.

Can I redirect URLs with query strings?

Yes. Include the query string in the old path, such as /page.aspx?id=5.

Want experts to handle your SEO, GEO and AEO?

iCreativez helps businesses rank on Google and get recommended in AI answers.