.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

Block visitors by IP address using .htaccess

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

Block Bad Bots and Spiders using .htaccess

Below is a useful code block for blocking a lot of the known bad bots and site rippers currently...

.htaccess RewriteRule Examples

Here are some useful mod_rewrite RewriteRule redirect examples that you can use in your .htaccess...

Do you support mod_rewrite for apache?

Yes, mod_rewrite is enabled on your server. For more information on what mod_rewrite is and how...

Speed up WordPress Leveraging Browser Caching via .htaccess

Insert the following code to your .htaccess file to increase the speed of your WordPress website...