.htaccess Redirect Generator

Generate 301 & 302 redirect rules for .htaccess.

Add these rules to the .htaccess file in your site root (Apache servers). Back up the file first.

How to use the .htaccess Redirect Generator

Simple, free and instant - no sign-up required.

1

Fill in your details

Enter your page info in the fields - everything is generated in your browser, nothing is uploaded.

2

Adjust the options

Tweak the settings to generate exactly the markup or URL you need.

3

Get the code instantly

Your tags, code or URL build live as you type - no waiting and no processing queue.

4

Copy & paste into your site

Copy the output or download the file, then drop it into your page head, server config or CMS.

Advertisement · 970×90

Frequently asked questions

Everything you need to know about .htaccess Redirect Generator.

It builds redirect rules for Apache servers — 301 (permanent) or 302 (temporary) page redirects, plus optional force-HTTPS and www / non-www canonicalization rules.
Use 301 for permanent moves (it passes SEO ranking signals to the new URL). Use 302 only for temporary redirects where the original URL will return.
In the .htaccess file in your site's root directory (Apache only — not Nginx). Back up the existing file first, as a syntax error can take your site offline.

Related tools

More handy tools for your workflow.

View all tools
.htaccess Redirect Generator | Free Online SEO & Web Tool - EveryFileTool