#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    London, England
    Posts
    262
    Rep Power
    14

    Where does http://<domain>.com redirect to?


    Hello,

    I am encountering something quite strange.

    We have a domain, lets say xyz.com.

    This domain works fine when you type in http://www.xyz.com in a browser (i.e. the correct website is served up). However, when you type in http://xyz.com it goes somewhere completely different, although related.

    I know that you create subdomains by using the format http://subdomain.xyz.com, and that you define these in your DNS and Apache configs. But what I don't understand is, is there some kind of generic subdomain that is used (when no subdomain or www. is present)?

    As when http://xyz.com is typed in, it goes to a closely related site hosted on the same server. I don't control the DNS but do control the webserver, so I am assuming that this is a DNS issue... Am I right?

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    Since you don't control the DNS, this is then entirely some issues with Apache. If you want http://xyz.com to be the same site as http://www.xyz.com (default), then add ServerAlias like so:

    <VirtualHost *>
    ServerName www.xyz.com
    ServerAlias xyz.com
    DocumentRoot /var/html/htdocs
    ....
    ....
    </VirtualHost>

    >> is there some kind of generic subdomain that is used

    It's all personal preference. If you are wondering what subdomain is available, ask your host.

IMN logo majestic logo threadwatch logo seochat tools logo