Htaccess Redirect Generator

Easily create .htaccess redirects for your site—fast, simple, no coding needed.

Tool Icon Htaccess Redirect Generator

About This Tool

So, you need to redirect URLs on your site, huh? Maybe you moved a page, changed your domain, or just want cleaner links. Whatever the reason, doing it manually in your .htaccess file can be a pain—especially if you're not used to Apache syntax. That’s where this little tool comes in. It’s not fancy, doesn’t track you, and doesn’t ask for your email. Just enter your old and new URLs, pick the redirect type, and boom—you get the code you need. I built this because I kept forgetting the exact format for 301 vs 302 redirects. One typo and your site throws a 500 error. Not fun. This generator spits out clean, ready-to-paste rules so you can stop Googling “htaccess redirect example” for the hundredth time.

Key Features

  • Generates correct Apache mod_rewrite rules for common redirects
  • Supports 301 (permanent), 302 (temporary), and other status codes
  • Handles full URLs, paths, and wildcards
  • No ads, no signups, no tracking—just the code you need
  • Works in your browser—nothing sent to a server
  • Explains what each part of the rule does (so you’re not just copying blindly)

FAQ

Will this break my site if I use the wrong code?
Possibly. If you paste invalid syntax into your .htaccess file, Apache might throw an error and your site could go down. That’s why I recommend testing on a staging site first—or at least backing up your current .htaccess before making changes. The tool gives you the right format, but you’re still responsible for where you put it.

Can I redirect from one domain to another?
Yep. Just enter the full old URL (like https://oldsite.com/page) and the full new one (https://newsite.com/page). The generator will create a rule that works across domains. Just make sure your hosting supports .htaccess overrides—some shared hosts restrict this.