How to Host a Subdomain on Another Server or Hosting Company…

Chris Andrews at 4:51 am on Friday, March 3, 2006

There are many times when it would be useful to host a sub-domain of your main site on another server or hosting company altogether. Maybe your sub-domain has outgrown the main site and you want to host it elsewhere for a better deal, maybe you’ve got some ultra cheap static file hosting for serving up images and videos elsewhere or maybe you have a company that allows you to have an affiliate store or something like that and they allow you to use your own domain. …except that you want to create a sub-domain of your main site to ensure consistency, customer trust and to retain your branding.

Whatever your need, the solution is simple, but requires you to have access to your DNS records for your domain. These will usually be found at your hosting company. If you use cpanel/whm, then this is fine - if you have access to the actual files themselves then this is good too.

This is completely different to how you’d normally set up a “soft” sub-domain which is essentially a folder within your normal site. Before you start you’ll need to know the IP address of the server that will be hosting the sub-domain account. In the instance that you’re creating another account, say with cpanel on another host, then go ahead and set up that new account. Where it asks you to enter your domain name you should enter the sub-domain and set it up as normal. If you want to point your sub-domain at a site where someone else deals with the hosting, then you’ll have to ask them for the IP address.

DNS Functions Once in possession of this, you then need to edit your DNS record. If you’re using WHM/Cpanel then you’ll see the option called “Edit DNS Zone” in the left hand menu. The select the domain name for the zone you wish to edit.

Don’t be scared of the next screen, just scroll down to where it says “Add New Entries Below this Line” and in the first column type the name of your sub-domain (just the first part, not the fully qualified name. For example if you are creating dominos.mygames.com then enter dominos). Leave the numeric value in the next column, and make sure the drop-down menu is selected as “A”. In the next column you then enter the IP address of the new server that will host the sub-domain. There may be extra blank boxes after this, but these can be ignored. Then click “save”.
DNS New Entry
If you’re editing your own files then you’ll need to locate your zone file, and in the section where the other sub-domains are set up (localhost, mail, www, ftp) add the line to set up your sub-domain. Zone files are often located in /var/named or /var/named/chroot/var/named.

There you are, if you previously set up a cpanel account for this at another host then it should soon be visible.

If you found this page useful, consider linking to it.
Simply copy and paste the code below into your web site (Ctrl+C to copy)
It will look like this: How to Host a Subdomain on Another Server or Hosting Company...

35 Comments »

506
Comment by Josh

Very helpfull article, thanks! I remember I wanted to do this a while back and couldn’t find out how so I posted at the official cpanel forums and they said it was not possible, go figure.

March 3, 2006 at 5:34 am
507
Comment by Mike

I’ve just learned how to do that myself. It makes a lot of sense when you build a huge forum on a domain that’s set up somewhere on cpanel. It’s nice to know the option of upgrading painlessly :)

March 3, 2006 at 5:59 am
508
Comment by MTO

Nice… just wondering, would it need to have a dedicated IP for this to work?

March 3, 2006 at 8:32 am
512
Comment by Chris Andrews

No, no need for a dedicated IP. The subdomain can be on a shared host.

March 3, 2006 at 7:27 pm
514
Comment by Derek

What about using something like DynDNS and pointing at that?

I want a subdomain of my website pointing to my home computer.. but can’t figure out how (without changing it every time my IP changes.. which isn’t often though)

March 4, 2006 at 2:20 am
515
Comment by Conor

Set up a DynDNS name or something like it. And then add a CNAME record pointing to the DynDNS name. Should do the trick.

March 4, 2006 at 3:24 am
519
Trackback by The.RSS.Reporter

=?utf-8?B?ZGVsLmljaW8udXMvcG9wdWxhcg==?=

Working wonders with OpenOffice 2.0’s Web Wizard || searchopensource.techtarget.com
http://searchopensource.techta…89483,sid39_gci1169832,00.html   

Coloring Book - Colorings
http://www.coloring-bo…

March 4, 2006 at 3:37 pm
522
Pingback by How To: Host a Subdomain on Another Server or Hosting Company… at Bharath Kumar

[…] How To: Host a Subdomain on Another Server or Hosting Company… Published by admin 0 minutes ago in How To Tags: No Tags. There are many times when it would be useful to host a sub-domain of your main site on another server or hosting company altogether. Maybe your sub-domain has outgrown the main site and you want to host it elsewhere for a better deal, maybe you’ve got some ultra cheap static file hosting for serving up images and videos elsewhere or maybe you have a company that allows you to have an affiliate store or something like that and they allow you to use your own domain. …except that you want to create a sub-domain of your main site to ensure consistency, customer trust and to retain your branding. # […]

March 4, 2006 at 9:08 pm
523
Comment by Mistro

Well done, that was a great article

March 4, 2006 at 9:53 pm
524
Comment by Jdog

Why not just use an .htaccess redirect on the main host to point the subdomain to the other server? DNS tweaks like this take time to resolve. htaccess changes are instantaneous.

March 4, 2006 at 10:14 pm
526
Pingback by r00tware » How to host a subdomain on another server or hosting company.

[…] read more | digg story […]

March 5, 2006 at 11:56 am
527
Comment by Mark Woodward

I wonder if it’s possible in the A record to point to a ’subdomain’? I tried doing this, and could never get it to work.

I wanted to point x.y.com to z.a.com/c …but never got it to function

Mark

March 5, 2006 at 8:05 pm
530
Comment by Homo-Adminus

Mark Woorward: You can use my trick with apache+mod_rewrite to point some-domain.com to another-domain.com/some-dir.

March 6, 2006 at 7:46 pm
548
Pingback by jiangws » Blog Archive » How to Host a Subdomain on Another Server or Hosting Company…

[…] How to Host a Subdomain on Another Server or Hosting Company… » ThirdSquare.com: […]

March 11, 2006 at 9:21 pm
Comment by malcolm

Thanks. I knew some of this but this is nicely written. More articles like this.

June 5, 2006 at 12:04 pm
Comment by Ron

My Dallas Real Estate Site is having one requirement as we need to host the video part as most of the hosting company has badnwidth limit per month they will not allow putting 10 mb of video. So I don’t know how can I set it up. If in cpanel I created a subdomain it ask for path. Then add a new A record which points to my IP. Please let me know how can I do that.

Regards

Ron

October 13, 2006 at 4:14 pm
Comment by nikeshoes

just wondering, would it need to have a dedicated IP for this to work?

May 9, 2007 at 10:59 am
Comment by airjordan

I knew some of this but this is nicely written. More articles like this

May 9, 2007 at 11:00 am
Comment by airjordan

Why not just use an .htaccess redirect on the main host to point the subdomain to the other server? DNS tweaks like this take time to resolve.

May 9, 2007 at 11:02 am
Comment by Donny

This article was put well together.

May 19, 2007 at 8:16 pm
Comment by Mike

I have a very similer situation but the sub domain is not on another server, it is on the same server as the main domain. I have access to the server through WHm.

I am trying to connect a couple of ip network cameras…

1. Set up the sub domain as a new account (The main domain is located on this server also)
2. Set up the sub domain to point to a ’spare’ ip address I have on the same server.

No joy, doesn’t seem to connect to the camera

Any ideas?

Thanks for the info.

June 28, 2007 at 8:05 pm
Comment by Donny Hall

Hello

Please check out www.sneakeralley.com for the latest styles of Authentic nike shoes including the very popular nike air force 1’s and Air Jordans.

November 24, 2007 at 2:33 pm
Comment by Grant Glendinning

Thanks alot, great article and exactly what I needed to know! Now my subdomain http://www.articles.cupargardencentre.co.uk is set up and full of home and garden-related articles. Thanks a bunch!

December 1, 2007 at 2:31 pm
Comment by nikecitycn

We supply brand shoes

December 9, 2007 at 10:32 am
Comment by TechGeek

Very helpful and interesting article, thanks!

February 18, 2008 at 4:56 pm
Pingback by -

[…] How to Host a Subdomain on Another Server or Hosting Company… ThirdSquare.com __________________ … … … … … … … … … … … … … … .. maxthon www.maxthon.com … … … … … … … … … … … … … … […]

March 26, 2008 at 6:41 pm
Comment by article directory

good article , thanks

March 27, 2008 at 12:42 am
Trackback by MaxGXL Benefits of Glutathione » MaxGXL Glutathione

MaxGXL Benefits of Glutathione » MaxGXL Glutathione

What really concerns me about this is the Fascistic bent of the courts decision. They seem to feel they know better how to raise and teach our children then we do. They are OUR children not the governments children. For years the school system has been…

March 27, 2008 at 2:48 am
Comment by nikecitycn

Nike air force 1 ones, Air Jordan shoes, Nike dunks, Air Max Shox, Bape Hoodies - We supply brand shoes (air max, jordan,nike shox,adidas, af1, bape, dunk, gucci, prada, puma, timberland, etc), bags, jeans, hoodies, shirts.
website: http://www.sneakersupplier.com

April 21, 2008 at 9:11 am
Comment by News

東京電力のショールームでオール電化住宅。相談をはじめ、家電の選び方・使い方もご提案!
ウェディングドレスオーダー、ウェディングドレスのトータルコーディネートまでサポートします。
低価格で全国へお届けします。レンタルのウエディングドレスから、デザイナーズ・ウエディングドレスなど。
アルカリイオン水が手作りできる、さんご浄水パックはこちら。

April 30, 2008 at 9:39 pm
Comment by cnnikecity

Nike,Jordan,Air force 1 sneaker - We supply brand shoes (air max, jordan,nike shox,adidas, af1, bape, dunk, iceream, puma, timberland, etc), bags, jeans.
website: www.sneakersupplier.com

May 20, 2008 at 10:41 pm
Trackback by العاب فلاش

العاب فلاش

Surely it didn’ t escape to you, that Macromedia released today the newest version of Flash 8. Since this morning you can order Flash 8 and the Studio 8 in the Macromedia Store. The Studio 8 is this time without Freehand and the ColdFusion MX 7 Devel…

May 26, 2008 at 8:58 pm
Comment by العاب

العاب

June 25, 2008 at 9:34 pm
Comment by becky

Nike,Jordan,Air force 1 sneaker - We supply brand shoes (air max, jordan,nike shox,adidas, af1, bape, dunk, iceream, puma, timberland, etc), bags, jeans.
website: http://www.sneakersupplier.com

July 4, 2008 at 7:49 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>