.htaccess Redirect Generator

Generate 301 (permanent) or 302 (temporary) redirect rules for Apache .htaccess.

Redirect Settings

Use path only (e.g. /old-page) or full URL

Queued Redirects

No redirects added yet. Click "+ Add Redirect" to add one.

.htaccess Output
# Your .htaccess rules will appear here

How to Use

  1. 1

    Choose redirect type (301 = permanent/SEO, 302 = temporary).

  2. 2

    Enter the old URL and new URL, then click + Add Redirect.

  3. 3

    Click Generate .htaccess — copy the output and paste into your .htaccess file.

📖 Want to learn more?

Read our in-depth guide: tips, best practices, FAQs, and real-world examples.

  • Add multiple redirects before generating
  • Use 301 for moved pages to preserve SEO ranking
  • Enable "Force HTTPS" to secure your entire site
Full Guide