Forums

Redirecting non-www with 123-reg

Hi all, I'm currently struggling to get my non-www domains to redirect to my www pythonanywhere webapp. My domain registrar is 123-reg:

First I tried using their web forwarding service but found that it caused an infinite redirect loop (as if I tell it to redirect domain.com to www.domain.com, it also tries to redirect www.domain.com to www.domain.com).

So then I went to advanced DNS and changed the IP address for the naked and * domains to the same IP as my webapp. Unfortunately, all this does now is point to the pythonanywhere 'Coming Soon!' site, instead of a 123-reg placeholder site as it did previously.

I cannot for the life of me find out how to change the A record for my naked and * domains to point to the URL of my webapp. Is there a way to do this without creating a placeholder webapp for my naked domain that redirects immediately to my www domain?

Many thanks

Could you send us a screenshot of your DNS settings to support@pythonanywhere.com? We can probably work out the problem from there.

Ok, will do!

any documentation about this?

This page on the 123-reg site explains how to set things up to redirect yourdomain.com to www.yourdomain.com.

Hi giles,

Initally I had used web forwarding, but this differs to the documentation within PA. Web forwarding also left me with the xxxxx.pythonanywhere.com within the url bar when I wanted my domain name.

I had followed the instructions on PA which was to use CNAME, this is up and configured on 123-reg. But it still fails to work, so I dropped an email to the PA support email with screen shots this am.

cheers

This is more a note for anyone else reading this thread than for @simonlaraman (whose problem was sorted out over email), just to clarify the thing about web forwarding.

When you set up a website on PythonAnywhere, let's say for yourdomain.com, then normally you need to set up a CNAME that points www.yourdomain.com to webapp-XXXXX.pythonanywhere.com -- where the full value with some numbers replacing XXXXX, is available on the "Web" tab. You set up the CNAME with your domain registrar; they all have different user interfaces for this, which can be confusing. Sometimes you just need to enter www (the yourdomain.com is implicit) and other times, you need to enter the full hostname, www.yourdomain.com. In general, our support team can normally help you work out what to do -- if things aren't working, send us a screenshot of the configuration page from your registrar's site, and we can suggest what (if anything) needs changing.

The web forwarding thing is to handle the next step. Once you have www.yourdomain.com working, you might want people who go to yourdomain.com without the www to get your site; that's what you use web forwarding for. For the technical details on that, check out this help page.