Domains and sub domains

Messages
162
Name
Tim
Edit My Images
Yes
I have two domain names domainabc.co.uk and domainxyz.co.uk

If I have understood everything I should be able to make a sub domain on domainabc like

http://domainxyz.doaminabc.co.uk

Then load all the pages that are on domainxyz over to the new sub domain on domainabc (are you keeping up?)

But can I take the domain name domainxyz.co.uk and point it to http://domainxyz.domainabc.co.uk so that when a user enters www.domainxyz.co.uk it takes them straight to the subdomain??

(Sorry if I have confused you)

Tim
 
yes you can.. there are many ways to point it.. it depends on what options your host provides..
 
In the .htaccess for www.domainxyz.co.uk try the following:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domainxyz.co.uk [NC]
RewriteRule ^(.*)$ http://domainxyz.doaminabc.co.uk/$1 [L,R=301]
 
Thanks for the info guys but another questions has arisen. The point of me doing this is I have two hosting packages and want to off load one but not loose the web site it hosts.

So if I don't have a hosting package for domainxyz (its now a sub domain of domainabc) I won't be able to use the .htacess method?? Both domain (and hosting packages) are with the same company so I just have to find out how they point domainxyz to the sub-domain on domainabc

Tim
 
You don't have a sub domain, what you have is a new host name under domainabc.co.uk

domainabc.co.uk is the domain

domainxyz is now a host under that domain (as is www)

What you need is a DNS redirect on www.domainxyz.co.uk to forward all requests for that URI to domainxyz.domainabc.co.uk

This is easiest if you have the IP address for domainxyz.domainabc.co.uk

Alternatively, you could used forwarding to resolve the issue, again should be available in the control panel for the domainxyz.co.uk

This way is easier to manage and maintain because it's all handled at the addressing level, and doesn't require a page to be maintained for the redirect at www.domainxyz.co.uk
 
Are the domains hosted with the website hosts?

You've got two issues
1) moving the actual files so that you can give up the web hosting
2) sorting out the dns

To some extent it depends on the web host that you are keeping and how that service is provided and how the dns is being handled.

Is your current dns resolving to an IP address or are you redirecting / using cname?
 
Back
Top