Forum Moderators: phranque

Message Too Old, No Replies

DNS & Sub-domains

Possible to loads external domain into sub-domain?

         

Bingo

1:00 pm on Jan 23, 2007 (gmt 0)

10+ Year Member



Hi,

Is it possible to load a website at an external domain to a sub-domain using DNS?

For example:

sub.example.com shows www.externaldomain.com

Not domain forwarding, the user stays on sub.example.com.

Thanks,
Bingo

Romeo

1:26 pm on Jan 23, 2007 (gmt 0)

10+ Year Member



You may consider these steps:

-1- look up the IP address of www.externaldomain.com
-2- create a corresponding DNS A-record entry in the DNS zone of example.com pointing to that IP address you got out of -1-
sub.example.com. IN A 10.1.2.3
-3- if www.externaldomain.com is definied as a named virtual host, check and edit the webserver's config file at and for www.externaldomain.com to add an alias for sub.example.com, so that the webserver will know what to do when requests for sub.example.com are coming in.
Otherwise the webserver will serve the default domain -- which may be something completely different.

The browser will break out of sub.example.com if the www.externaldomain.com uses absolute internal links.
And beware of 'duplicatae content' issues in search engines.

Kind regards,
R.

Bingo

2:25 pm on Jan 23, 2007 (gmt 0)

10+ Year Member



Thanks for the relpy.

Both domains are on virtual hosts.
I can edit DNS settings for both domains as follows:

Host:
Type: A/CNAME
Destination:

Is this enough control to achieve what I want?

Thanks,
Bingo

Romeo

3:42 pm on Jan 23, 2007 (gmt 0)

10+ Year Member



I can edit DNS settings ...
I don't know what exactly you can or can't with what you have.

You need to *add* a new A-record entry into the DNS zone of example.com (hmm, or replace, if it should be already there by change).
If your 'edit' function lets you do that, you are lucky, otherwise you are toast, sorry.

And don't forget step -3- on the target webserver.
You have to deal with both, the DNS definiton for sub.example.com and the webserver's config of www.externaldomain.com

Kind regards,
R.