Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I created a free website in Google Sites and bought a new URL, www.example.com, from Go Daddy and configured CNAME subdomain www to my Google Site.

If I enter www.example.com in any browser it opens. But if I enter example.com (no www) it does not open my site.

I am sure that this problem is in the CNAME configuration. As per my knowledge CNAME subdomains are mail, www, ftp, etc.

How can I configure it so that if you enter the example.com URL it goes directly to the www subdomain?

share|improve this question

migrated from webapps.stackexchange.com Dec 16 '13 at 13:20

This question came from our site for power users of web applications.

add comment

1 Answer 1

up vote 2 down vote accepted

You can't set a CNAME for your root domain (because a CNAME can't co-exist with any other record for the domain, and you have to have NS and SOA records for your root domain). There's no good solution to this if you don't operate your own infrastructure, except for ensuring that people always use www.myurl.com and not just myurl.com.

share|improve this answer
    
but all other global websites are able to open without www, is it because they have hosted in separate server? I am hosting freely in google sites and bought url from godaddy. –  raja ashok Dec 7 '13 at 12:48
1  
It's because they know the IP addresses of their servers won't change, and so they can set A records for them instead of CNAMEs. –  Mike Scott Dec 8 '13 at 6:17
    
The answer is absolutely correct. However, I'd like to mention that there are some DNS providers that offer proprietary solutions for this issue without the need to manage a custom infrastructure. Disclaimer: I work at DNSimple and we were one of the first companies to offer such feature, known as the ALIAS record. –  Simone Carletti Dec 17 '13 at 0:46
add comment

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.