Welcome to WebmasterWorld Guest from 54.196.233.239

Forum Moderators: phranque

Message Too Old, No Replies

Setup a Domain on A Different Host

domain setup when you have different host and different domain provider

     

deathlock

10:12 am on May 9, 2011 (gmt 0)



So for example I have a website www.example.com hosted on host A. And I set up a subdomain for it, let's say it's subdomain.example.com

Then I want www.anodomain.com to point to subdomain.example.com. So if someone wants to open subdomain.example.com, they should access it through www.anodomain.com

Is it possible? How to achieve it?

lammert

10:35 am on May 9, 2011 (gmt 0)

WebmasterWorld Senior Member lammert is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Hi deathlock, first of all welcome to WebmasterWorld!

Do you still want to display www.anodomain.com in the address bar of your browser, or is it OK to show subdomain.example.com there. If you don't mind which domain is shown in the address bar, a 301 redirect from one domain to the other is enough. Otherwise you have to put the second site in a frame, or use proxying between the two servers where the main server is requesting the other server for the pages, and then forwards those pages to the user.

mbabuskov

10:38 am on May 9, 2011 (gmt 0)



Either by defining CNAME record in DNS or http redirect. It depends what hostname you wish to see in the browser's address bar.

deathlock

10:55 am on May 9, 2011 (gmt 0)



I want to display www.anodomain.com in the address bar... so it will display (for example) www.anodomain.com/about.php, www.anodomain.com/forum/index.php, etc...

How to define the CNAME record in DNS? Which record should I change?

lammert

10:59 am on May 9, 2011 (gmt 0)

WebmasterWorld Senior Member lammert is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



A CNAME in the DNS doesn't help if the webserver isn't recognizing that name. You should first make sure that the webserver is sending data if requests are coming in for www.anodomain.com, not only for subdomain.example.com. What kind of webserver software are you using?

deathlock

12:09 pm on May 9, 2011 (gmt 0)



Hmm... I'm sorry, I don't quite understand the issue...

My site (the subdomain.example.com) is hosted on a shared hosting. Meanwhile the www.anodomain.com is just a domain, without a hosting.

On the cPanel of the subdomain.example.com, it is said is hosted on Linux server, Apache version 2.2.17, MySQL version 5.0.92-community-log

deathlock

3:35 pm on May 9, 2011 (gmt 0)



Sorry, I want to edit the post but it seems I can't?

My site is hosted on a shared hosting, so I can't tell precisely what webserver software I'm using... but I believe it is Apache version 2.2.17.

So... is is it achieveable?

lammert

3:45 pm on May 9, 2011 (gmt 0)

WebmasterWorld Senior Member lammert is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



If you are hosted on Linux, it is almost 100% sure that you have Apache. The problem with shared hosting is that you cannot just let the server listen to www.anodomain.com. That must be configured in a central file called httpd.conf, and that file is only accessible by your hosting company. Roughly there are two options:

1) ask your hosting company to add www.anodomain.com to the httpd.conf and let it point to the directory of your subdomain. This is technically the easiest solution but they may ask money for it.

2) Setup a framing or proxy server setup at your DNS provider or at another hosting company which translates www.anodomain.com requests to subdomain.example.com requests.

Technically the first one is the simplest one and I would do that. Your hosting company may ask a fee to do it, but I think that is worth it, looking at all the technical issues you'll have with the other option.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month