Free Developer Tool

.htaccess Redirect Generator

Safely route your traffic and preserve SEO juice by generating proper 301 and 302 redirect rules.

Quick Options

Redirect Rules

.htaccess Output

Options -MultiViews
RewriteEngine On
Upload this file to your server's root directory. Test redirects in a staging environment before going live.

Get Results in Seconds

1

Choose your redirect type

301 is permanent — use it when a page has moved for good and you want to pass SEO value. 302 is temporary — use it for seasonal pages or A/B tests.

2

Enter the source URL

This is the old URL you want to redirect from. You can use exact paths (/old-page) or wildcards for pattern matching.

3

Enter the destination URL

Where you want visitors and search engines to end up. Use the full path or absolute URL.

4

Copy the rule into your .htaccess file

Add it near the top of your .htaccess file, before other redirect rules. Test in a staging environment first.

Common Questions

Where is the .htaccess file located?

In the root directory of your website — the same folder as your index.php or index.html. It's a hidden file, so enable "show hidden files" in your FTP client to see it.

Will a 301 redirect pass all my SEO ranking?

Google passes most (around 90–99%) of the original page's link equity through a 301 redirect. The small amount of loss is acceptable for genuine structural changes. Chained redirects (A→B→C) lose more, so redirect directly to the final destination.

Can .htaccess redirects slow down my site?

Very slightly — each redirect adds a small HTTP round trip. Keep your redirect list clean and avoid redirect chains. For high-traffic sites, consider implementing redirects at the server config or CDN level instead.

Related Tools

More Developer Tools

View all tools
Chat with us on WhatsApp