Htaccess Redirect Generator

1. Select redirect type

2. Enter your domain name

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

3. Get your code

4. Copy the code to your .htaccess file

About Htaccess Redirect Generator

Htaccess redirect generator is a tool which will generate the code for htacces file to redirect your website address as you need it.

It can generate the code to redirect 'www' site to 'non-www' site as well as 'non-www' site into 'www' site as per need of a webmaster. It also can generate the code for redirecting the 'http' protocal into 'https' protocal.

What is htaccess file?

Htaccess file is a first file fetched by any server before accessing the website. This file is a basic file which have all basic informations for loading of a website.

Any website accesses the htaccess file before any of the files on the server and loads as per the information provided in htaccess file.

This file holds redirect information of a website on server, such as if user puts website address as "" but your website is at address "" then having the code to redirect 'www' to 'non www' in htaccess file will redirect this website as needed.

Why to use htaccess redirect generator?

When a user visits your website he sometimes input 'www' before your website address and sometimes he don't. But if your website is not ready to redirect 'www' into 'non-www' then when your website visitor usese 'www' before your web address, your website will show error instead of loading. 

And if your website is with 'www' but not ready to redirect 'non-www' in 'www' then when your website visitor usese 'non-www' address of your website it will show error.

So it is always better to decide main format for your website address between '' and '' and use a htacces redirect file as per that format.

To get the redirection code for your htacces file this htaccess redirect generator is a lifesaver tool.

What are benefits of htacces redirect generator?

Coding is not easy for everyone, sometimes well known coders also forgets the code format of htaccess file. This tool is easy to use, and gives you the htaccess redirect code in just few steps.

For a webmaster or blogger, their website visitors are very valuable for their business. Loosing even one of the website visitor just because he inputted their website address with 'www' rather than 'no-www' or vice versa is not good for them.

So having htaccess redirect code into their server will be a business saver for them and this tool will be beneficial to generate that code.

How it works?

This tool takes your preference between 'www' to 'non-www' and 'non-www' to 'www' as you want. Then you have to put your website address without 'www' into the given box.

After selecting your preference and inputting your website address into box, you have to click on submit button and it creates the htaccess code for you instantly.

After adding this code into your htaccess file or creating a .htacces file with this code in it, your website will redirect as per your need.

Why to use our htaccess redirect generator?

Our htaccess redirect generator is simple and easy to use tool. There is no complicated interface given, just a selection tab to choose between "www to non-www" or "non-www to www".

And a blank box where you have to put your website address without www and a submit button which instantly gives the htaccess code for your .htaccess file.

How to use it?

This tool is completely easy to use as only two step action is required to get age information of your or your competitor’s domain.

Step1: Select between "www to non-www" or "non-www to www".

Step2: Enter your website address in the given box.

Step3: Click on submit button. And Done! You get a htaccess code for your .htaccess file instantly.

You can check out more of our useful SEO and website utility tools like XML Sitemap Generator and Meta Tag Generator.