Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Depending on your server this can be done several ways.

    Linux server via .htaccess:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

    Windows server via web.config

    <configuration>
    <system.webServer>
    <rewrite>
    <rules>
    <rule name="Redirect to WWW" stopProcessing="true">
    <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^domain.com$" />
    </conditions>
    <action type="Redirect" url="https://www.domain.com/{R:0}" redirectType="Permanent" />
    </rule>
    </rules>
    </rewrite>
    </system.webServer>
    </configuration>

    Hope that helps.

    Kind regards
    Jamie

    Waht have you entered in:

    general – settings – Site Address (URL)

    Thread Starter THE_NIN9S

    (@the_nin9s)

    Ah, it was that easy ??
    I hadn’t entered “www” under general – settings – site address (URL).

    Thank you for the help Mike!

    Glad to help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘www.mywebsite.com instead of mywebsite.com’ is closed to new replies.