Afrihost Hosting / CNAME Question

Pieter2008

Well-Known Member
Joined
May 14, 2008
Messages
162
Reaction score
35
Location
Vrystaat
Hi
Excuse my ignorance on the subject but any help or insight would be greatly apprecaited.

I have a website hosted with Afrihost on the Windows Bronze Home hosting package, let's say www.mysite.co.za. The website is running and showing its content no problem. So what was required is to point another domain, say www.theirsite.co.za, to show www.mysite.co.za's web content when you type in that domain's name into a browser.

So the person hosting the other website updated the CNAME for theirsite to point to mysite. They informed me that they completed this update but that theirsite is redirecting to www.afrihost.com when you type it into a browser.

I then did a tracert and checked the www A record in Afrihost DNS editor that saw the IP address is 41.76.xxx.yyy , and when you type that into a browser it goes to the Afrihost.com site. Why is this, why doesn't it go to my website? How do we solve the issue for displaying mysite when going to theirsite in this scenario. Thanks.
 
venturing a guess here, but it is likely due to the host header in iis.. the host header will have your url's configured in there, and set to listen on a specific ip.. www.theirsite.co.za does not have a host header entry on your website within iis, therefore iis does not know which website to redirect the request to, resulting in the default afrihost page popping up..

maybe ask support if they can add the host header entry for you..
 
You would need a 301 redirect from theirsite.co.za to mysite.co.za so that the actual host header changes.

The server "sees" theirsite.co.za, tries to find it on their hosting, can't, then redirects to afrihost.com

So in CPanel, just add "theirsite.co.za" with the host directory pointing to "mysite.co.za" directory on the server, and the web server will now know to serve mysite.co.za content for theirsite.co.za
 
Your Web site needs their url in its virtual host config.
 
So in CPanel, just add "theirsite.co.za" with the host directory pointing to "mysite.co.za" directory on the server, and the web server will now know to serve mysite.co.za content for theirsite.co.za

Question: I am inside the Clientzone DNS Editor. Do I add a new record or change an existing one?
 
These guys all seemed to miss that you are hosting on Windows and not Linux.. and that you want to point another site to your site on the windows hosting..

so, the dns is updated and www.theirsite.co.za now points to the webserver where www.mysite.co.za is hosted.. that is all good.. www.mysite.co.za is on a Windows web server, IIS.. the request for www.theirsite.co.za now reaches IIS, but IIS does not know where the website content is located.. this is why you need a host header added in IIS for www.theirsite.co.za on your existing website, www.mysite.co.za..
 
Question: I am inside the Clientzone DNS Editor. Do I add a new record or change an existing one?

Nothing to do with DNS, everything to do with the web server not recognizing your new website because you're just CNAME'ing it

If there is no web server setup to respond to www.newsite.co.za you won't get anything
 
Thank you, I got it sorted out now.
I sent Afrihost an email with what I required and they took care of it from their side.
Here is the response received from them as future reference for anyone who might be interested :
I understood that the site 'www.theirsite.co.za' wants to load the contents of the domain 'www.mysite.co.za'. I have pointed the domain 'theirsite.co.za' to 'mysite.co.za' and added proper binding. Now the domain 'www.theirsite.co.za' is loading the contents of 'www.mysite.co.za'.
 
Top
Sign up to the MyBroadband newsletter
X