.htaccess 301 Redirect Generator

A simple .htaccess 301 redirect generator to be used to create SEO friendly permanent redirects.
For more advanced rules you can visit our .htaccess RewriteRule Examples.


Redirect old domain to new domain

Old Domain   

New Domain 




Redirect to www

Domain 




Redirect old directory to new directory

Old Directory   

New Directory 




Redirect old URL to new URL

Old URL   

New URL 

Was this answer helpful?

Also Read

Leverage Browser Caching using .htaccess

Add the following .htaccess rules to the very end of your .htaccess file to reduce the load times...

Point your home page URL to a subdirectory

Method 1 - Redirect your main domain to a subfolder on that domain: RewriteEngine On# Change...

.htaccess rules to Harden your website’s Security

Below you see a list of the important rules that you can add to your .htaccess file to harden...

Block visitors by IP address using .htaccess

Deny access based upon IP address, or an IP block, by placing the following code into your...

How to execute php code as .htm or .html files

In your .htaccess file insert this line of code. addhandler application/x-httpd-php .htm .html