Htaccess Redirect Generator

Generate Apache 2.4+ redirect rules for HTTPS, canonical hostnames, and one-off URL moves. The output is loop-safe and ready to place near the top of your root .htaccess file.

1. Choose redirect goal

2. Site settings

Use the root domain only, for example example.com.
Pick the version indexed in Search Console and used in your internal links.
Use 301 for most SEO migrations. Use temporary codes only while testing.
END prevents further per-directory rewrite processing on Apache 2.4+.

3. Path redirect settings

Start with /. For folders, use /old-folder/.
Use a full https:// URL for migrations across hosts.
Code copied to clipboard.

Place these rules before WordPress, CMS, or application routing rules. Test with temporary status codes first if you are changing a live site.


About Htaccess Redirect Generator

Generate the correct .htaccess code for 301 redirects, WWW to non‑WWW, and HTTPS redirects without touching a messy file.
Real‑world scenario: You’re moving from HTTP to HTTPS and need the exact redirect rule. You generate the code, paste it at the top of the .htaccess file, and all pages redirect perfectly without mixed content errors.
How to use it:

  1. Choose the redirect type (e.g., redirect to non‑www, redirect to HTTPS).
  2. Enter your domain name.
  3. Click “Generate”.
  4. Copy the code and paste it at the very top of your .htaccess file (make a backup first!).


Recommended tools: Seowolf's www Redirect Checker | Seowolf's Robots.txt Generator | Seowolf's XML Sitemap Generator | Seowolf's Server Status Checker


DigitalOcean