Htaccess Redirect Generator

Htaccess Redirect Generator

Select redirect type:

What Is .htaccess?

The .htaccess file is a configuration file used by Apache web servers to control URL redirects, access rules, and other server behaviors. Properly configured redirects are essential when moving pages, changing URL structures, or migrating domains.

How to Use This Tool

  1. Select the redirect type (301 permanent or 302 temporary)
  2. Enter the old URL and new URL
  3. Generate the .htaccess redirect code
  4. Add the code to your .htaccess file

After adding redirects, verify them with our Redirect Checker and HTTP Status Code Checker.

Frequently Asked Questions

Should I use 301 or 302 redirects?

Use 301 for permanent moves — it transfers SEO value. Use 302 only for genuinely temporary redirects.