All tools .htaccess Redirect Generator ● Live Developer Tools

How .htaccess Redirect Generator works

  1. Enter the source path you want to redirect from, e.g. /old-page.
  2. Enter the full destination URL, e.g. https://example.com/new-page.
  3. Review the generated Redirect 301 rule in the output box.
  4. Copy the rule and paste it into your site's .htaccess file.
  5. Repeat for each additional redirect you need.
  • Redirect an old blog post URL to its new location after a content restructure.
  • Set up a canonical redirect from a non-www or trailing-slash variant to your preferred URL.
  • Preserve SEO value when retiring a page by pointing it to its closest replacement.
  • Redirect a moved page after a site migration to a new URL structure.

The redirect rule is generated entirely in your browser from the paths you type. Nothing is uploaded or logged.

  • Generates one redirect rule at a time — bulk redirect lists must be assembled manually by repeating the process.
  • Only produces the Apache mod_alias 'Redirect' syntax; it doesn't cover RewriteRule/RewriteCond patterns for wildcard or regex redirects.
  • Specific to Apache — the output won't work on Nginx, IIS, or other web servers without translation.

.htaccess Redirect Generator

.htaccess Redirect Generator creates common redirect rules for moved pages, canonical URLs, and small site migrations. It gives copyable rules without server-side processing.

.htaccess Redirect Generator Runs locally

.htaccess Redirect Generator

Generate common Apache redirect rules for migrations and canonical URLs. Everything runs locally in this tab.

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

How to use

  1. Enter the source path you want to redirect from, e.g. /old-page.

  2. Enter the full destination URL, e.g. https://example.com/new-page.

  3. Review the generated Redirect 301 rule in the output box.

  4. Copy the rule and paste it into your site's .htaccess file.

  5. Repeat for each additional redirect you need.

Scenarios

Use cases

  • Redirect an old blog post URL to its new location after a content restructure.

  • Set up a canonical redirect from a non-www or trailing-slash variant to your preferred URL.

  • Preserve SEO value when retiring a page by pointing it to its closest replacement.

  • Redirect a moved page after a site migration to a new URL structure.

Good to know

Limitations & Privacy

Private by design

The redirect rule is generated entirely in your browser from the paths you type. Nothing is uploaded or logged.

  • Generates one redirect rule at a time — bulk redirect lists must be assembled manually by repeating the process.

  • Only produces the Apache mod_alias 'Redirect' syntax; it doesn't cover RewriteRule/RewriteCond patterns for wildcard or regex redirects.

  • Specific to Apache — the output won't work on Nginx, IIS, or other web servers without translation.

FAQ

Frequently asked questions

Is .htaccess Redirect Generator free to use?

Yes. The tool is free and runs directly in your browser with no account required.

Does this tool upload my data?

No. The redirect rule is generated locally in the browser tab and is not sent to a server.

What is this tool best for?

Quickly writing a single, correctly formatted 301 redirect rule for an Apache .htaccess file after moving or renaming a page.

What does this tool generate?

A single Redirect 301 line in the form 'Redirect 301 /old-page https://example.com/new-page', which permanently redirects the old path to the new URL.

Why does it always use a 301 redirect instead of 302?

301 (permanent) is the standard choice for SEO-motivated redirects, since it tells search engines to transfer ranking signals to the new URL. If you need a temporary 302 redirect, change the '301' to '302' in the copied output.

Where do I put the generated rule?

Paste it into the .htaccess file in your site's root directory (or the directory the source path is relative to). Apache reads .htaccess rules on each request, so no server restart is needed.

Can I generate multiple redirects at once?

This tool generates one rule per use. For several redirects, repeat the process and stack the resulting Redirect 301 lines in your .htaccess file.

Does this work for non-Apache servers like Nginx?

No — the Redirect directive is specific to Apache's mod_alias. Nginx, IIS, and other servers use different redirect syntax.