.htaccess Redirect Generator
Build a ready-to-paste Apache .htaccess Redirect rule from a source path, destination URL and 301 or 302 status code.
How to Use the .htaccess Redirect Generator
- Enter the source path as it appears after the domain.
- Enter the full destination URL including https://.
- Pick 301 (permanent) or 302 (temporary).
- Click Calculate and paste the generated line into .htaccess.
Casos de Uso
- •Migrating URLs after a rebuild.
- •Fixing broken backlinks from legacy blog posts.
- •Adding maintenance redirects.
Fórmula
Rule format: Redirect <code> <source> <destination>. 301 = permanent, 302 = temporary.
Preguntas Frecuentes
301 or 302 — which one?
Use 301 for permanent URL changes (SEO link equity passes). Use 302 for short-lived redirects such as A/B tests or maintenance.
Where does this rule go?
In the .htaccess file at your site root, or inside a Directory block in httpd.conf. Apache reloads .htaccess on each request, so no restart is needed.
Can I use regex?
The Redirect directive takes literal prefixes only. For regex use RedirectMatch or mod_rewrite\u2019s RewriteRule. This generator sticks to the safer literal form.