SEO / Webmaster

.htaccess Redirect Generator

Generate .htaccess rules for Apache without remembering the syntax: pick a redirect type (a 301/302 page redirect, a regex rewrite, a whole-domain move, force HTTPS, or www ↔ non-www), fill in the paths, and copy the rules or download the file.

Redirect type

Path on this server, starting with /

Full URL with scheme

Status code

Add to your .htaccess


      
301 vs 302 — which should I use?

Use a 301 for a permanent move: it passes nearly all SEO ranking signal to the new URL and is cached by browsers. Use a 302 (or 307) only for a temporary redirect you intend to reverse, such as a maintenance page or A/B test.

Where do I put the .htaccess file?

Place it in the root directory of the site or folder you want the rules to apply to (usually the same folder as your homepage). The rules take effect for that folder and everything beneath it.

Why isn't my redirect working?

The most common causes are that mod_rewrite isn't enabled, the rules are in the wrong order (Apache applies them top to bottom and the first match can win), or your browser cached an earlier 301 — test in a private window. Redirects also only work on Apache servers, not Nginx.

Does this send my URLs anywhere?

No. The rules are generated entirely in your browser from the values you enter; nothing is uploaded.

All SEO / Webmaster tools →