Forums

Setting up a DNS domain to resolve to PythonAnywhere

I've successfully pointed my .ie DNS domain name at my PA application - by first creating a CNAME record for www.example.ie and then using the 'set up new web app' wizard. So www.example.ie now resolves to example.pythonanywhere.com.

However I'd also like the example.ie (without the www) to resolve to my PA application. Right now I get a 'dns_server_failure' when I try the domain without the www.

Does this require additional setup from you or is it something I must manage via my DNS hosting company?

Hi there. Have you seen this earlier forum question? In short, you can't use CNAMEs with "naked" domains (i.e. example.ie in your example above), but your DNS hosting provider may be able to perform HTTP-level redirection to www.example.ie which will work for at least websites. This isn't a PA issue, it's a restriction in the way DNS works.

As an aside, for non-HTTP services and for HTTPS websites you'll have more trouble - HTTP redirection of course won't work for other protocols (e.g. FTP) and HTTPS is an issue because even if your DNS provider offers HTTPS redirection, it'll most likely be using the wrong certificate (unless they allow you to provide one), thus triggering security warnings in the browser. The most common case is standard HTTP redirection, however, and as long as your DNS host provides that in some form then it should work fine.

It would've helped if I searched the forum first :)

Thanks Cartroo - I'll contact my DNS provider.