Forums

CNAME config doubt.

Hello everyone!

My name is Ismael and at work we recently got a custom pythonanywhere account. I want to serve a project made of static files only (which i'll port to Django as I learn it). I'm able to upload the page specifying the directory of the static files in the Web tab. If I choose to use mexlavu.pythonanywhere as the name it works, this is the result:

  • http://mexlavu.pythonanywhere.com

Since we upgraded to a custom account, we used our domain www.mexlavu.com

Alias: www.mexlavu.com
# notice that the form added a trailing dot on save.
Name: mexlavu.pythonanywhere.com. 
Type: CNAME

The domain provider is a Google associate, enom.

I currently get this 404 error from Google, here:

  • http://www.mexlavu.com

Previous to modifying the CNAME I got another 404 error from our server, so I think at least Google is trying to look it elsewhere now, but according to documentation it may take up to 72 hours.

So my question is, is it normal to receive 404 while the CNAME is propagated? I'm sorry I don't know about this stuff yet and I don't want to wait 72 hours only to notice it didn't work.

What do you think guys? Thanks in advance!

Cheers.

Hi there,

While CNAMEs are propagating, you'll normally just see whatever is running at the IP address your browser happens to get for the hostname, so if that's a Google site you'll see the Google site, and so on.

I've done a little investigation from my side, and I can't see the CNAME pointing to PythonAnywhere yet. A good site to track it is What's my DNS, where you can see that it's still showing up as pointing to ghs.google.com.

One thing that I did check which looks like there may be a problem is asking the name servers that are authoritative for your domain where they think it should be. According to who.is the authoritative name servers are

  • DNS1.NAME-SERVICES.COM
  • DNS2.NAME-SERVICES.COM
  • DNS3.NAME-SERVICES.COM
  • DNS4.NAME-SERVICES.COM
  • DNS5.NAME-SERVICES.COM

However, when I asked them where your domain should be (the command, in a Bash console, on PythonAnywhere, is dig www.mexlavu.com @DNS1.NAME-SERVICES.COM) I still got ghs.google.com. That suggests that perhaps the CNAME setup you've done didn't work properly. Perhaps you could check with the domain provider?

(BTW the extra dot at the endo of the mexlavu.pythonanywhere.com. is absolutely fine.)

Thank you very much Giles, this is what I have at our enom's domain settings contact information:

Host Records:

  • Host Name: www.mexlavu.com
  • Address: mexlavu.pythonanywhere.com.
  • Record Type: CNAME (Alias)
  • Options

There are also several references to ´ghs.google.com.´ but I don't know if its safe to show them here, do you have a private chat?

That certainly sounds OK. Could you email me a screenshot of the other settings to support@pythonanywhere.com?

Fixed, thanks a lot Giles!

Excellent, thanks for confirming! Do you mind if I share the explanation we discovered in our email discussion? (I think I can do so without giving away anything confidential :-)

(MexLavu confirmed by email that it's OK to share the explanation if we keep the appropriate stuff confidential.)

The problem was that the interface for the CNAME setup allowed the user to enter www.mexlavu.com and set up a CNAME pointing to mexlavu.pythonanywhere.com, but it wasn't clear from the page that the name you entered was the bit that went before the domain name -- that is, by entering www.mexlavu.com you were actually specifying a CNAME for www.mexlavu.com.mexlavu.com.

By changing the CNAME so that it just mapped www to mexlavu.pythonanywhere.com, the problem was fixed.

If it can help others configure their DNS settings, then sure, please do document it! So long the sensible information stays confidential.

Everyone @pythonanywhere, have a nice day!

Oh! I see, thanks again Giles!

No problem :-)