Do you like this tool?

If you found this page useful, you may consider linking to it. Simply copy and paste the code below into your web site (Ctrl+C to copy)

It will look like this: .htaccess domain redirection tool


.htaccess domain redirection tool

Please type the domain name

non-www version like

www version like

What is the canonical redirect?

Search engines threat the www and non-www version of a single domain as different websites. With the genrated .htaccess code you may easily sove this issue and let us search engines know about your personal preferences.

Pick the code and paste it into a file called .htaccess without any file extension. Upload to the root folder of the domain, and test it.

How to redirect the index.php or index.html file to the domain?

Pick the code from the textarea below and paste it into the .htaccess file. If your site uses html as default file extension you may want to use the same code replacing the php with html in it.

For more information about the need of canonicalization related URL redirection please read these resources: