Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just got a new .CO domain name and I'm curious how to make it accessible without the www.

I understand that these two are not necessarily the same thing, but how does one go about securing/arranging both?

I've tried googling this but it's hard to successfully google this when your major keywords are 'www' and... not www. =)

share|improve this question

migrated from stackoverflow.com Oct 15 '10 at 14:55

This question came from our site for professional and enthusiast programmers.

1  
This is a question for ServerFault, not StackOverflow. –  DarkDust Oct 15 '10 at 7:35
    
Sorry DarkDust, I didn't know. Should I delete the question? –  sscirrus Oct 15 '10 at 7:48

1 Answer 1

up vote 2 down vote accepted

If you own the domain example.com, you also automatically own all subdomains for it. www.example.com is a subdomain of example.com, so is foobar.example.com and baz.www.example.com. Usually you buy the domain without the www., it'd be unusual to buy only the right to the www. subdomain without also owning the parent domain.

What you need to do is set up your host (the server that hosts the actual website) correctly to serve websites for www.example.com and/or example.com. As long as the DNS system is set up correctly to send requests for example.com to your host, www.example.com should work as well. If your host responds to queries for www.example.com and/or example.com with the right website, you're all set. This is pretty standard, usually you don't need to do anything to make this work. It may depend on the host/registrar though, ask them for details.

share|improve this answer
    
Exactly what I needed to know. Thank you deceze! –  sscirrus Oct 15 '10 at 9:43
    
deceze, hi! do you do this from the htacces? any good tut? or doc?? thanks a lot!! –  Trufa Oct 21 '10 at 18:55
    
@Trufa No, the DNS system needs to be set up to direct requests for www.example.com and example.com to the right host. Then the host needs to be set up to accept requests for both domains and invoke files in a corresponding directory. Only then do .htaccess files come into play, which is much too late to do anything in this process. Contact your registrar or web host for details, as they will vary. –  deceze Oct 21 '10 at 23:07
    
Yeah, I did and they did it for me but I was curious as to how they actually did it, but nevermind, I ask them :) thanks for the clarification!! –  Trufa Oct 21 '10 at 23:14
    
@Trufa Well, it's not something you can do, unless you have access to the DNS and webserver configuration. If you're not given a UI, all you can do is ask your provider. Try to read up on how DNS works and play around with an Apache installation if you're interested in the details. –  deceze Oct 22 '10 at 0:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.