SiteTidy
Home /Tools /.htaccess Redirect Generator

.htaccess Redirect Generator

Generate error-free Apache .htaccess rewrite rules for 301 redirects, HTTPS enforcement, and domain migrations.

.htaccess Redirect Generator

Generate precise, flawless Apache rewrite rules for 301 redirects, domain migrations, and SSL enforcement without touching a regex tutorial.

Generated Configuration

.htaccess
Redirect 301 /about-us /about
Apache Web Server Compatible

What is a 301 Redirect?

A 301 redirect is a permanent redirect that passes between 90-99% of link equity (ranking power) to the redirected page. It is the best method for implementing redirects on a website, especially for SEO purposes.

When to use these redirects:

Single Page Redirect

You moved a page or changed its slug. You want to make sure old bookmarks and search engines point to the new location without users seeing a 404 error.

Force HTTPS

You installed an SSL certificate and want to ensure that no one can access the unsecured (HTTP) version of your site. This redirects all http:// traffic to https://.

Force www or non-www

Search engines treat www.example.com and example.com as two separate websites. To avoid duplicate content penalties, you should pick one version and permanently redirect the other version to it.

Entire Domain Redirect

You bought a new domain name and want to move your entire website over. This rule will catch every path (e.g. /about) on the old domain and seamlessly redirect it to the exact same path on the new domain.

Related Guides

Deepen your understanding with our expert articles.