How do I redirect www site to the non-www version?

Asked by:
onlin164 / 64 Points
2013-09-05 11:53 am EST
Domain Names
Greetings team Web Hosting Hub!

I would like domain to redirected from www to http//: / in order to avoid duplicity SITE for better indexing in search engines.
I tried to change it through the section "Redirects", which, in turn, reports:
"You cannot redirect" "to" "as this will cause a redirection loop because" / home / username / public_html / "is at the same place as" / home / username / public_html / ."

How nevertheless do it?
In advance I thank you for the help me.

Yours faithfully, Vsevolod M.

To ask this user for more information, please first login.

To submit an answer, please login.



12,011 Points
2013-09-05 12:29 pm EST
Hello Vsevolod,

Thank you for your question. You can force all sites to load with or without the "www," I recommend following our guide here, as it explains how to code your .htaccess file.

If you have any further questions, feel free to post them below.
Thank you,


To submit a comment on this answer, please first login.

Dear John-Paul!
Thanks for your answer!
But something does not work this directive :
# Force non-www:
RewriteEngine on
RewriteCond% {HTTP_HOST} ^ www \. Example \. Com [NC]
RewriteRule ^ (. *) $> Http:// $ 1 [L, R = 301]
Redirection is not happening!
In addition, pops up a window for a username and password.
How to get rid of the showing this window which constantly pops up after you enter the address with the

In advance I thank you for the help me.

Yours faithfully, Vsevolod M.
64 Points

2013-09-05 1:05 pm EST
Hello Vsevolod,

After updating your .htaccess file, you may have to clear your browser cache, which may be affecting your results.

Also, other rules in the .htaccess file may be interfering with this rule. Have you tried moving the rule, so it is next to other "Rewrite rules" ?

We are happy to help, but can you provide a link to the domain, so we can troubleshoot more effectively?

If you have any further questions, feel free to post them below.
Thank you,

12,011 Points
2013-09-05 1:33 pm EST
Please, my domain
64 Points

2013-09-05 1:58 pm EST
Hello Vsevolod,

I went and tested the domain name - it's changing the URL to the non-WWW version as per the request. If I type, it changes to "".

Please make sure to clear your browser cache. It should be working with no problems. I added the lines to your .htaccess file - the one you had active on your account was blank.

Please let us know if you continue to require any further assistance.

Arnel C.
16,349 Points
2013-09-05 2:34 pm EST
Dear Arnel C.
Thank you very much!
Good luck!
64 Points

2013-09-06 9:17 am EST
Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.