Contact

hs-icon-callcenter
Call
hs-icon-callcenter

Call us

Our support team is happy to help you, be it for technical or administrative issues. We’re there for you!

 

+41 (0)84 800 80 80
(Calls from Switzerland 8 centimes / minute)

Administration

Monday to Saturday
9.00 – 12.00 am
1.30 – 5.30 pm
 

Technical Support

Monday to Friday
8:00 am – 5:30 pm

Saturday
9:00 am – 4:00 pm

hs-icon-doc-write
Write
hs-icon-doc-write

Write to us

To be able to help you as quickly and effectively as possible, we kindly ask that you make your request as specific as possible. And of course you can contact us by email: support@hoststar.com

All fields marked with «*» are mandatory and must be completed.

 

301 Redirect with htaccess

Support > > Domain information

Sometimes it is necessary to set up a permanent redirect (301). We recommend storing this via a .htaccess file.

Follow these steps:

1. Open editor

Open Notepad or a similar text editor (in Windows: «Start – Run – "notepad" – OK»)

2. Content

Create a file with the following contents:

Redirect to domain with www

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 to domain without www

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.

3. Save .htacces file

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.

Was this article helpful?