You are not logged in.

#1 2011-06-20 01:16:00

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Configuring one domain to seamlessly lead to a subdomain of another

Here's my situation:

I have two domains (weheartgames.net and sporkbox.us). weheartgames.net has hosting, sporkbox.us does not. I want sporkbox.us to lead to sporkbox.weheartgames.net seamlessly, without an explicit redirect. Everything I've tried that actually worked changed the URL in the address bar to sporkbox.weheartgames.net. I don't want that and was wondering if I can accomplish what I'm after with just DNS entries.

I'm using cPanel, if it matters.

Offline

#2 2011-06-29 06:51:28

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Re: Configuring one domain to seamlessly lead to a subdomain of another

Would it help if I said I've done my own research and couldn't find what I was after? I even contacted my host and the solution they gave me was the URL redirect that changed what was in the address bar.

Offline

#3 2011-06-29 08:23:14

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Configuring one domain to seamlessly lead to a subdomain of another

The problem is that the web server (whatever that is) is looking for the Virtual Host (HTTP "Host:" header) to decide what content to serve. At the moment it is only configured to look for "sporkbox.weheartgames.net". You need to configure it to also respond to "sporkbox.us"

In Apache, this is done with a "ServerAlias" directive. Having said that, I doubt your hosting provider will let you access this kind of config, especially since it's in their interests to NOT have you hosting multiple sites from 1 hosting package.

Offline

#4 2011-06-29 08:42:51

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Configuring one domain to seamlessly lead to a subdomain of another

Does weheartgames.net have a dedicated ip address, or can the hosting provider add sporkbox.net as a secondary domain to their vhost file? In that case it shouldn't be a problem, it's just a matter of pointing the sporkbox ip to weheartgames and do a little scripting there.

See for instance this Wordpress plugin which does the same magic.

fukawi2 wrote:

In Apache, this is done with a "ServerAlias" directive. Having said that, I doubt your hosting provider will let you access this kind of config, especially since it's in their interests to NOT have you hosting multiple sites from 1 hosting package.

In that case i would switch hosting providers, i know many that do allow this or are willing to help their customers out by setting it up on request.


ᶘ ᵒᴥᵒᶅ

Offline

#5 2011-06-29 12:38:56

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Configuring one domain to seamlessly lead to a subdomain of another

litemotiv wrote:

In that case i would switch hosting providers, i know many that do allow this or are willing to help their customers out by setting it up on request.

Depends on the provider of course... Going by their suggested solution to the problem, I'm guessing either:
1) they're either not interested in having multiple sites on the one hosting plan
2) they're not capable of doing it
3) they don't understand the problem
I'd change providers in case of 1 or 2 also.

Offline

Board footer

Powered by FluxBB