Forums

Domain Name Transfert from Hostinger

Hello, I have a wordpress website hosted on Hostinger (website host + domain name provider) : www.schopp-gis.tech I have another website I built with django on pythonanywhere. I upgraded my account in order to point my domain name (schopp-gis.tech) on my pythonanywhere website. The CNAME provided by pythonanywhere is "webapp-532829.pythonanywhere.com" Hostinger support helped me to configure my domain name to point to pythonanywhere CNAME (updating the CNAME under the Domains Tab -> host : schopp-gis.tech -> Point to : webapp-532829.pythonanywhere.com) My domain name is "schopp-gis.tech" so I also rename my pythonanywhere website : "www.schopp-gis.tech" (adding www as per the documentation). My previous website is no longer available under schopp-gis.tech but the domain doesn't point to my pythonanywhere website, instead I get a 404 error. I am just wondering if my configuration is correct, I tried to contact pythonanywhere support but I had no luck yet.

Right now, it looks like:

  • You have a CNAME from www.schopp-gis.tech pointing to the correct endpoint on PythonAnywhere, but you need to add that hostname to the ALLOWED_HOSTS list in your Django settings -- once you've done that, the site should be working fine on that address.
  • The hostname schopp-gis.tech without the www is pointing to an IP address that is not on PythonAnywhere. We recommend that you set it up so that it redirects to www.schopp-gis.tech once you have that address working. From what I can see in the documentation on Hostinger's site, they only do domain redirects if you are using them for hosting as well as domain registration, so the easiest way is probably to use wwwizer -- just add a "A" record to make schopp-gis.tech point to the IP address that they provide on this page.

Great, thank you,

Now I've got "schopp-gis.tech" (well referenced on google) redirecting to my previous website and "www.schopp-gis.tech" (not referenced yet) redirecting to my new django website. The quick get-arround I will implement is to add a link from "schopp-gis.tech" to "www.schopp-gis.tech" but it is inconvenient, what would be the proper way to resolve it ?

This is the solution regarding my initial post :

-- Hostinger --

On hostinger dashboard, go to "manage domain" -> "DNS Zone" Tab.

On the "CNAME (Alias)" section, I had several entries but the one to focus on is "host"->'"www" "Point to" ->"domain-name.com" (in my case that was "schopp-gis.tech")

Replace "Point to" part with the PythonAnywhere CNAME, for example : "host"->'"www" - "Point to" ->"schopp-gis.tech" become : "host"->'"www" - "Point to" ->"webapp-532829.pythonanywhere.com"

This is it. At this stage, my domain-name "schopp-gis.tech" does not appear anymore into Hostinger "CNAME (Alias)" section, which is all right.

Check propagation on https://www.whatsmydns.net/ (it took about 2 hours in my case)


-- Python Anywhere --

Change webapp name to -> "www.schopp-gis.tech" Add "www.schopp-gis.tech" into ALLOWED_HOST in django settings. Reload website. Done ! ;)

Regarding this bit:

Now I've got "schopp-gis.tech" (well referenced on google) redirecting to my previous website and "www.schopp-gis.tech" (not referenced yet) redirecting to my new django website. The quick get-arround I will implement is to add a link from "schopp-gis.tech" to "www.schopp-gis.tech" but it is inconvenient, what would be the proper way to resolve it ?

The second part of my last post explains that -- you need to add an A record to point schopp-gis.tech to the IP address provided by wwwizer. Once you've done that, and the change has propagated, if someone goes to http://schopp-gis.tech they will be automatically and transparently redirected to http://www.schopp-gis.tech. Likewise, if they go to http://schopp-gis.tech/something they will be redirected to http://www.schopp-gis.tech/something. Google will also recognise this, and update its indexed links.

That's right ;) I read to fast, thank you

No problem! Let us know if you have any problems setting it up.

I managed www redirection from FlareCloud, now both "schopp-gis.tech" and "www.schopp-gis.tech" redirect to my PythonAnywhere website. However, I have now an error message when I try to reload my webapp, saying that "there is a problem with your domain name configuration". The webapp is not reloaded.

That's because we have no way of checking CloudFlare configuration so, if you use CloudFlare, you will always see that message.

I think Glenn missed out your statement that "the webapp is not reloaded" -- are you sure that's the case? You will see an error message due to the problem he mentioned, but the webapp should definitely be restarted. If you're sure it's not, what are the specific indications you're seeing of that?

Hello, thank you for your answers, it is ok, the website reloads, I didn't clear my browser cache, that was the problem, thank you for your explanations regarding CloudFlare

Excellent -- glad it's all sorted!