r-d-r-b-3
r-d-r-b-3

Reputation: 325

WWW Domain redirects to Non WWW Domain automatically

When I try to access my site at www.example.com it redirects to example.com I checked my .htaccess file but their are no rules inside. I checked my DNS records which show (looks good to me) :

cheapantivirusprices.com            NS      ns2.hostnetbv.nl 
cheapantivirusprices.com            NS      ns1.hostnetbv.nl 
ftp.cheapantivirusprices.com        CNAME   cheapantivirusprices.com 
webmail.cheapantivirusprices.com    A       37.128.146.237 
mail.cheapantivirusprices.com       A       37.128.146.237 
localhost.cheapantivirusprices.com  A       37.128.146.237 
cheapantivirusprices.com            A       37.128.146.237 
*.cheapantivirusprices.com          A       37.128.146.237 
www.cheapantivirusprices.com        A       37.128.146.237 

Does anybody know how this can happen ?

Example url =

Upvotes: 0

Views: 183

Answers (2)

cweekly
cweekly

Reputation: 9075

Check your DNS provider. These days most DNS providers offer HTTP redirection (e.g. from example.com to www.example.com, or vice versa). So it might be happening before the traffic even reaches your apache instance.

See http://help.dnsmadeeasy.com/record-entry/http-redirection/ for illustrative details.

Upvotes: 0

Mikhail
Mikhail

Reputation: 492

In documentation for Plesk 11.5 this behaviour is well described (see section "Website Hosting" - Preferred domain)

http://download1.parallels.com/Plesk/Doc/en-US/online/plesk-administrator-guide/index.htm?fileName=72051.htm

check redirect rules in apache virtual config for your domain(section mod_rewrite) /var/www/vhosts/system//conf/last_httpd.conf

Solution:

  1. Go to subscriptions
  2. Click on "Manage hosting" for your domain
  3. Go to "Websites & Domains"
  4. Click on "Hosting Settings"
  5. Select "None" in the "Preferred domain"
  6. Save settings

Upvotes: 1

Related Questions