Free .htaccess Redirect Generator - 301 Redirect Rules

Search Engine Optimization
  1. Home
  2. Webmaster
  3. .htaccess Redirect Generator
Share: Report

.htaccess Redirect Generator

100% free · Runs 100% in your browser · No signup needed

Redirects (old path → new URL)
Old path: /old-page (leading slash, no domain). New URL: full https://... address. Use 301 for permanent moves (keeps SEO value), 302 for temporary ones.
Your .htaccess rules
Add redirects above and the Apache rules appear here live.
How to use: append these rules to the .htaccess file in your website's root folder (Apache servers). Always back up your existing .htaccess first - one typo can take your site offline.

About .htaccess Redirect Generator

What is the .htaccess Redirect Generator?

The .htaccess Redirect Generator is a free online tool that writes correct Apache .htaccess redirect rules without you touching server syntax. Redirects tell browsers and search engines that a page has moved: a 301 permanent redirect passes nearly all ranking power to the new URL, while a mistyped rule can create redirect loops or 500 errors. This tool builds safe, tested rule blocks for the most common jobs, including forcing HTTPS, choosing www or non-www, redirecting single pages, and moving whole folders.

Hand-writing mod_rewrite rules is risky because one wrong character can take down a site. The generator produces rules in the right order with clear comments, so you can review exactly what each block does before uploading. Just fill in your domains and paths, copy the output, and paste it into your .htaccess file.

How to Use the .htaccess Redirect Generator

  1. Pick a redirect type: Choose HTTPS enforcement, www preference, single-page 301, or folder redirect.
  2. Enter your URLs: Fill in the old address and the new destination exactly as they should appear.
  3. Generate the rules: Click the button to build the commented .htaccess block.
  4. Copy the code: Use the copy button to grab the rules without transcription errors.
  5. Install safely: Back up your current .htaccess, paste the new block at the top, upload, and test every redirect.

Key Benefits

  • Correct syntax: Properly escaped mod_rewrite rules in the right order.
  • SEO-safe 301s: Permanent redirects that preserve your hard-earned rankings.
  • HTTPS in one click: Push every visitor to the secure version of your site.
  • Commented output: Every block explains what it does for future you.
  • Free with no signup: Generate unlimited redirect sets right in your browser.

Pro Tips

  • Back up first: Always save a copy of your working .htaccess before uploading changes.
  • Test with curl or a redirect checker: Confirm the status code is 301 and the destination is exactly right.
  • Avoid redirect chains: Point old URLs directly at the final destination instead of hopping through intermediates.
  • Keep rules minimal: Remove redirects for pages nobody visits anymore to keep the file fast and readable.

Frequently Asked Questions

What is the difference between a 301 and a 302 redirect?

A 301 is permanent and passes ranking signals to the new URL. A 302 is temporary and keeps signals with the old URL. Use 301 for permanent moves.

Will this work on my hosting?

The rules work on Apache and LiteSpeed servers with mod_rewrite enabled, which covers almost all shared hosting including FistHost.

Can bad redirect rules break my site?

Yes, which is why the tool generates tested blocks and reminds you to back up first. Re-upload your backup if anything misbehaves.

Do I need to restart the server after editing .htaccess?

No. Changes take effect on the very next page load.

Related Tools

For full server files try our .htaccess Generator, verify your redirects with the WWW Redirect Checker, and measure the speed gain using the Page Speed Checker.

Redirects work best on hosting that never keeps visitors waiting. FistHost web hosting serves your pages from blazing-fast servers with free SSL included, plans from $0.99/mo and a free domain, so every redirect resolves in a blink.

User Reviews

No reviews yet. Be the first to review this tool!

Write a Review

★★★★★

Captcha

Reviews are protected by captcha and moderated before they appear.


FistHost

Blazing-Fast Web Hosting

Plans from $0.99/mo
Free domain included

Get Hosting
FistHost Web Hosting Blazing-fast hosting for your website Plans from $0.99/mo · Free domain included Get Hosting