Htaccess Redirect Generator
Generate .htaccess redirect rules for Apache servers. Create 301, 302, and other redirects with an easy visual interface.
Permanent redirect - Best for SEO, passes link equity
Redirect Rules
Quick Templates
Generated .htaccess
# Generated by Hazuu Tools - Htaccess Redirect Generator# 2026-02-21RewriteEngine On# Redirect www to non-wwwRewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]RewriteRule ^(.*)$ https://%1/$1 [L,R=301]
File Information
Testing & Validation
About Htaccess Redirect Generator
The .htaccess file is a powerful configuration file used by Apache web servers to control URL redirections, access control, and other server-level settings. Properly configured redirects are essential for maintaining SEO value when migrating pages, changing domains, or restructuring your website.
Our Htaccess Redirect Generator simplifies the process of creating redirect rules. Instead of manually writing complex RewriteRule syntax, you can visually configure 301, 302, and other redirect types, add domain-level redirects, force HTTPS, and more — all with real-time code generation and built-in testing.
How to Use
Configure Redirects
Choose a redirect type, add source and destination URLs for each rule, and toggle options like exact match or case insensitivity.
Use Advanced Options
Set up domain redirects, force HTTPS, manage trailing slashes, or apply quick templates for common scenarios.
Copy or Download
Review the generated .htaccess code, test URLs against your rules, then copy or download the file to upload to your server.