Htaccess Redirect Generator

Generate Apache 301 redirects and HTTPS/www rules.

Quick answer: Free Htaccess Redirect Generator. Securely generate Apache rewrite rules, 301 redirects, and HTTPS enforces directly from your browser.

for Apache servers — add to the .htaccess file in your site root

Generate ready-to-paste .htaccess rules for Apache servers — single-page 301 redirects, force HTTPS, www to non-www (or the reverse), and trailing-slash normalization.

How it works

  1. Choose the type of redirect required (e.g., domain change, HTTPS enforcement).
  2. Provide your old and new URLs where applicable.
  3. The generator outputs Apache-compliant .htaccess code ready for copy-pasting.

Frequently asked questions

301 vs 302 redirect?

Use 301 for permanent moves so search engines pass ranking signals to the new URL. 302 is temporary and keeps the old URL indexed.

Where do these rules go?

In the .htaccess file in your site root on an Apache server. Nginx uses a different syntax.

Why force HTTPS and one www variant?

Serving one canonical version avoids duplicate-content dilution and ensures every visitor lands on the secure address.

More in SEO & Web