Skip to main content
ESC
Start typing to search 370+ free tools

Htaccess Redirect Generator


1. Select redirect type





2. Enter your domain name


Do not include www. Domain name only - e.g. yourdomain.com

3. Get your code


4. Copy the code to your .htaccess file



What Is an Htaccess Redirect Generator?

An .htaccess redirect generator creates the exact redirect rule syntax Apache servers use to send visitors and search engines from one URL to another — needed when you move a page, change your URL structure, or migrate to a new domain and want to preserve existing SEO value instead of losing it to a broken link.

How Our Htaccess Redirect Generator Works

Enter your old URL and the new destination URL, choose the redirect type (301 permanent or 302 temporary), and the tool generates the properly formatted RewriteRule or Redirect line ready to paste into your .htaccess file.

How to Use the Htaccess Redirect Generator

  • Enter the old URL you're redirecting from
  • Enter the new destination URL
  • Choose 301 (permanent) or 302 (temporary)
  • Click Generate
  • Copy the rule into your site's .htaccess file

Key Features

  • 301 and 302 support — choose the correct redirect type for your situation
  • Correct Apache syntax — no need to memorize RewriteRule formatting
  • Copy-ready output — paste directly into your .htaccess file

Who Uses This Tool

Site owners migrating or restructuring URLs use it to preserve SEO value through proper redirects. Developers use it as a quick reference instead of hand-writing RewriteRule syntax. SEO consultants use it during site migrations to map old URLs to new ones correctly.

Frequently Asked Questions

Should I use a 301 or 302 redirect?
Use a 301 for permanent moves, since it passes SEO value to the new URL; use a 302 only for genuinely temporary redirects, since it signals the change isn't permanent.

Where do I place the .htaccess file?
In your site's root directory — it only works on Apache servers, not Nginx, which uses a different redirect syntax entirely.

Is this tool free?
Yes, generating redirect rules is completely free.


Related Tools



Safe & Secure
We respect your privacy and do not store your data.
Instant Results
Get results in real-time with our powerful tools.
Mobile Friendly
Use our tools on any device anytime, anywhere.
Always Updated
We update our tools regularly for better results.

300+ Free SEO Tools — No Signup Needed

Keyword research, backlink checker, plagiarism detector, meta tags & more. All free, all instant.

Explore All Tools