Htaccess Redirect Generator

Search Engine Optimization

Htaccess Redirect Generator


1. Select redirect type





2. Digite seu nome de domínio


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

3. Get your code


4. Copy the code to your .htaccess file



Sobre Htaccess Redirect Generator

htaccess  Redirect Generator

Various web servers such as Apache, supports htaccess file. it is topically a directory-level configuration file. You can use a htaccess file to control your site or configure website-access issues, such as redirect URLs to a new url, URL shortening, access control, and more.

The most popular use of a directory-level configuration file is redirecting you site URLs to HTTPS or HTTP and WWW or non-WWW pages.

This online free tool is a easy tool to generate www or non-www redirection. It generates best suitable htaccess entries as per your requirements.

How to Edit / Modify htaccess file?

The htaccess file stars whit a .(dot). The dot makes it hidden from users in Unix-based environments. To unhide htaccess file login to your cpanel, the go to File manager. Now click on settings, now a new window will open. Hare you have check show hidden file option and then click on save button. Now you can view youe (.)htaccess file.

modify or edit htaccess

Now when you have access to htaccess file you can easily edit or modify the file and save.

Why www or non-www Redirection is Important?

You should always redirect you URLs to whether WWW or non-WWW for better SEO. If you do not set your urls to any one of redirection, search engines counts as two separate URLs. It causes duplicate article issue, so you do not get better ranking.

So you need to set any one redirection as per your requirements.

How to Use Htaccess Redirect Generator?

To set redirection, visit our Htaccess Redirect Generator page, Now Select redirect type between "Redirect from www to non-www" and "Redirect from non-www to www". Then you have to enter your website URL. Now press the Get htaccess Code button.

It will now generate the best code for your site. Copy the generated code and paste it on your htaccess file.

What is www to non-www Redirection?

WWW to non-WWW redirection makes your your www URLs to non-www URLs. 

For Example: 
Site:  http://www.example.com
To:    http://example.com

What is non-www to www Redirection?

non-WWW to WWW redirection makes your your non-www URLs to www URLs. 

For Example: 
Site:  http://example.com
To:    http://www.example.com