Htaccess redirect from www domain to non-www domain
Permamently redirect all users that visit the www domain to the non-www domain. In short, remove the “www” from the domain using mod_rewrite and .htaccess file. Write this text in your .htaccess file: RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.domain\.tld$ [NC] RewriteRule ^(.*)$ http://domain.tld/$1 [R=301,L]RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.domain\.tld$ [NC] RewriteRule ^(.*)$ http://domain.tld/$1 [R=301,L]