Sometimes it is necessary to set up a permanent redirect (301). We recommend storing this via a .htaccess file.
Follow these steps:
Sometimes it is necessary to set up a permanent redirect (301). We recommend storing this via a .htaccess file.
Follow these steps:
Open Notepad or a similar text editor (in Windows: «Start – Run – "notepad" – OK»)
Create a file with the following contents:
Redirect domain.com to www.domain.com
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
Copy the italicized text into your file and replace «domain.com» and «www.domain.com» with the desired domain name.
Redirect www.domain.com to domain.com
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
Copy the italicized text into your file and replace «domain.com» and «www.domain.com» with the desired domain name.
Save the file with «File – Save As...». The filename should be «.htaccess», the file type should be «All Files». Be sure to save the file in «ANSI format».
Load now the «.htaccess» file via FTP into the ROOT-folder of the domain.