Htaccess Redirect Generator

Search Engine Optimization

Htaccess Redirect Generator


1. Select redirect type





2. Enter your domain name


Do not include www. Domain name only - e.g. yourdomain.com

3. Get your code


4. Copy the code to your .htaccess file



About Htaccess Redirect Generator

301 Redirects and SEO

301 RedirectsSince they are permanent redirects (not temporary for maintenance, etc.) 301 redirects pass between 90-99% of link juice (ranking power) to the redirected page.

There are a number of reasons that you may need to direct one domain to another. Perhaps you redesigned your site and have a new domain. Maybe you have unused domains for your brand that you would like to start using.

Regardless, in most cases, the 301 redirect is the best method for implementing redirects on a website if you are at all concerned about preserving the SEO value of the original domain.

How Do .htaccess 301 Redirects Work?

When you redirect an old domain to a new one, something needs to tell the web server for your old site to direct the traffic to a different location. One way to do this is with a simple text file with the extension .htaccess. (There isn’t a file name, just an extension.)

Note* This .htaccess method of redirection works ONLY on Linux servers with the Apache Mod-Rewrite moduled enabled.

Then, when users or search engines visit your website, the .htaccess file will direct them to the correct location.

Since it is a permanent redirect, the search engines will eventually replace the old domain with the new domain.

How to Create 301 Redirects with .htaccess

Step 1: Download or Create a New .htaccess File

Wait! You may already have an .htaccess file! Since .htaccess files are a simple way to communicate with your web server, they are used for a lot more than just 301 redirects.

Many website and content management tools, like WordPress, use .htaccess in order to work.

Before you create a new .htaccess file, we recommend that you check to see if your site already has one.

If you have one, great! Download the existing file, add the snippet of code from the domain redirect tool, save it, and upload it to your site.

If you do NOT have one, create a new file in a simple text editor, and save it as .htaccess (No file name, just the extension.)

Step 2: Generate the 301 redirect code

Use our .htaccess 301 Redirect Tool to generate the code for your redirect, and then copy and paste it into your .htaccess file.

Step 3: Upload Your .htaccess File