Forums

CNAME only wwwin some browsers direct correctly?

Hi

I have a CNAME to www.dominochinese.com, but it only seems to work for www. The wildcard, for example when I use the android browser gives an error saying there is nothing at that address. So it seems wildcard does not work (* CNAME TTL and domi...PA.com). Only the www works.

So if someone writes dominochinese.com instead of www.dominochinese.com they do not get to the website with some browsers. Anyone had the same problem? Anyone has a solution?

Hello,

Ideally you want the naked domain to redirect to the www. Google penalises websites that have two URLS with identical content.

Well I do not get it.

CNAME requires me to insert a www as a subdomain. should I skip that www and just go for a star * ?

cheers

The problem is that CNAMEs don't work if you don't have anything in front of the domain name -- that is, you can have a CNAME for www.dominochinese.com, or somethingelse.dominochinese.com, but not for dominochinese.com. This is a limitation of the way DNS works.

But understandably you want your users to be able to just go to http://dominochinese.com/ and get your site. There are two ways to do this:

  • Use a redirection service so that when someone goes to http://dominochinese.com/ they are redirected to http://www.dominochinese.com/, or if they go to `http://dominochinese.com/foo they are redirected to http://www.dominochinese.com/foo, and so on. This is the best solution, and it looks like your domain name registrar might be able to do this -- if I understand this page in Swedish correctly, there's something in Control Panel - yourdomain - Advanced Settings - Website, redirects
  • Use an A record for dominochinese.com and a CNAME for www.dominochinese.com. The A record has to be an IP address -- use the one associated with dominochinese.pythonanywhere.com. This is a much worse solution, but if you can't set up the redirection service then it might be the only way.

There are two reasons why the redirection setup is much better:

  • If your webapp uses a CNAME, then we at PythonAnywhere can much more easily load-balance it. We control the DNS for *.pythonanywhere.com (obviously) so if your DNS settings say that your domain is wherever dominochinese.pythonanywhere.com is, when we change our DNS for dominochinese.pythonanywhere.com then your website will automatically follow.
  • If you use the A record setup, then you essentially have two copies of your site on the Internet, one at www.dominochinese.com and one at dominochinese.com. If someone links to you, they might link to one or the other -- you have no control over which. This means that the Google pagerank you get from incoming links is split between the two sites, which means that each one of your sites gets less than half the pagerank you'd get by having just one canonical version. This will really mess up how high up you appear in search results -- essentially, you're competing with yourself for placement. I've also heard that Google give lower ranking to sites that appear to be copies of other sites (to penalise spammers) -- so it could be even worse.

Hope that helps clarify things.

Just would like to say how I really like the useful pieces of help around the forums, it's gotten many problems fixed for me! Keep on with it!

Glad to help :-)