The htaccess redirects generator tool is intended for use when making URL changes, web migrations, or configuring your website's canonical URLs (those that should be indexed and ranked). By referring your users and search bots to their new or canonical URLs versions via permanent redirects, you can avoid losing traffic and rankings from your former or non-canonical URLs (with 301 HTTP status). The generator aims to make the most common Web redirection scenarios easier to implement using htaccess by generating the necessary rewrite code that can be pasted into your htaccess file if you're using an Apache Web Server. To use this tool, select the redirect type www or non-www redirect. After that, enter the domain name. Finally, press on the " Get .htaccess code " button. You can copy the code to your clipboard.