Search engines don’t like some versions of site URL, even if it’s the same domain with and without "www". Sometimes search engines can ban your site because of the same content on several domains.

So, if you want your site to be without "www", you need to add some rules to a web-server. For example, our site is "", we need to make a permanent redirect from "" to "".

For nginx it is:

if ($host = '' ) {
rewrite ^(.*)$$1 permanent;


For Apache (with module mod_rewrite)

RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule (.*)$1 [R=301,L]