Generate .htaccess redirect rules for Apache — 301/302 redirects, HTTPS enforce, www normalise, IP block, custom error pages, and bulk URL redirects.
Fill in the fields or paste your input text. Click Sample to load an example and see the tool in action.
Press the main button to process your input. Results appear instantly — all processing runs in your browser, no upload needed.
Check the output panel. Any errors are shown in a red bar with a clear description so you can fix the input quickly.
Click Copy to copy to clipboard, or Download to save the result as a file.
A .htaccess file is a configuration file for Apache web servers. It lets you control URL redirects, enforce HTTPS, block IPs, add password protection, set custom error pages, and much more without touching the main server config.
A 301 is a permanent redirect. Search engines transfer all ranking signals (link equity) to the new URL. A 302 is temporary — search engines keep the old URL indexed and do not transfer authority. Use 301 for permanent moves, 302 for temporary ones.
No. Properly implemented 301 redirects are recommended by Google for site migrations and URL changes. They pass ranking signals to the new URL and prevent duplicate content issues.
Use the "Force HTTPS" rule type. It generates a RewriteCond and RewriteRule that permanently redirects all HTTP traffic to HTTPS — the standard approach for SSL enforcement in Apache.
Paste it into the .htaccess file in your website's root directory (usually public_html/). Create the file if it doesn't exist. Test all affected URLs immediately after saving.
No. This tool generates Apache mod_rewrite syntax. Nginx uses a completely different configuration format. If your server runs Nginx, you need Nginx redirect rules instead.