Web Hosting Forum Login
Not a member yet? Sign up

How to point subdomain to another server?

  • HOME
  • FORUMS
  • BLOGS
  • WEB HOSTING OFFERS
  • ADVERTISING
  • FIND A HOST
  • WEB HOSTING
  • QUICK MENU
  • REGISTER HERE - Join us for FREE
Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2013
    Posts
    20
    Thanks
    4
    Thanked 1 Time in 1 Post
    Thumbs Up/Down
    Received: 0/0
    Given: 8/0

    How to point subdomain to another server?

    I'm using WHM/cPanel and I had my domain name hosted on an IP, just wondering how can I setup a sub domain to point to a different server independently without a redirection?

  2. #2
    Join Date
    Jul 2016
    Location
    Hertfordshire, UK
    Posts
    656
    Thanks
    33
    Thanked 149 Times in 130 Posts
    Thumbs Up/Down
    Received: 292/2
    Given: 113/3
    You should just be able to change the DNS for that subdomain in the DNS zone for the domain. Just point those records at the other server.
    UK Web Hosting | Reseller Hosting | VPS | Domain Registration | Affiliates
    100% Cloud Powered | 30 Day Money Back Guarantee | cPanel | 365 Day UK Support
    https://www.ljshost.com

  3. #3
    Join Date
    Jan 2017
    Posts
    36
    Thanks
    2
    Thanked 18 Times in 12 Posts
    Thumbs Up/Down
    Received: 29/0
    Given: 32/0
    Hi elzorro,

    You can login to your DNS management for your domain and add an a record for your sub-domain. The below is a sample record in from my DNS zone. ftp1 would be your sub-domain name. The 0.0.0.0 should be replace with the ip of your other server.

    ftp1 A - IPv4 Address 0.0.0.0

  4. #4
    Join Date
    Oct 2013
    Posts
    20
    Thanks
    4
    Thanked 1 Time in 1 Post
    Thumbs Up/Down
    Received: 0/0
    Given: 8/0
    Quote Originally Posted by LJSHost View Post
    You should just be able to change the DNS for that subdomain in the DNS zone for the domain. Just point those records at the other server.
    Would you mind giving me a real example? I will use A record for this?


    Quote Originally Posted by kevinhng86 View Post
    Hi elzorro,

    You can login to your DNS management for your domain and add an a record for your sub-domain. The below is a sample record in from my DNS zone. ftp1 would be your sub-domain name. The 0.0.0.0 should be replace with the ip of your other server.

    ftp1 A - IPv4 Address 0.0.0.0
    Can you share me an image how to setup this? I am new to WHM/cPanel.

    One question more, Instead of pointing for a sub domain, I can point for a sub folder

    For example

    example.com/myblog/

    /myblog/ will be hosted on other hosting servers.

    I have not ever done this in the past.

  5. #5
    Join Date
    Jan 2017
    Posts
    36
    Thanks
    2
    Thanked 18 Times in 12 Posts
    Thumbs Up/Down
    Received: 29/0
    Given: 32/0
    Quote Originally Posted by elzorro View Post
    Would you mind giving me a real example? I will use A record for this?




    Can you share me an image how to setup this? I am new to WHM/cPanel.

    One question more, Instead of pointing for a sub domain, I can point for a sub folder

    For example

    example.com/myblog/

    /myblog/ will be hosted on other hosting servers.

    I have not ever done this in the past.
    I do not think you can point a folder to another hosting provider. I don't think DNS record allow you to point a folder to an ip, DNS only allow you to point the URL itself but not the fragment of it which is the folder structure. However I think you can point the sub-domain to a difference server and then use mod-rewrite or redirect your folder to your sub-domain.

    For Cpanel edit of DNS record check out this link https://documentation.cpanel.net/display/ALD/Edit+DNS+Zone.

    In Cpanel click on simple DNS zone editor. You will get that screen in the image. In the name box of add an A record put in the sub-domain name. In the address box of add an A record is the I.Pv4.0 address of the hosting server. After fill in that two box you can click add an A record.

    Name:  Screenshot from 2017-01-12 01:21:23.jpg
Views: 53
Size:  52.7 KB

    For redirection you need to use .htaccess file with rewrite engine. You can add the below to the .htaccess file on your web-root directory.
    Code:
    Options +FollowSymLinks
    RewriteEngine On
    Redirect 301 /myblog http://myblog.yourdomain.com/

  6. The Following User Says Thank You to kevinhng86 For This Useful Post:
    elzorro (01-12-2017)

  7. #6
    Join Date
    Jul 2016
    Location
    Hertfordshire, UK
    Posts
    656
    Thanks
    33
    Thanked 149 Times in 130 Posts
    Thumbs Up/Down
    Received: 292/2
    Given: 113/3
    Quote Originally Posted by elzorro View Post
    Would you mind giving me a real example? I will use A record for this?

    Can you share me an image how to setup this? I am new to WHM/cPanel.
    If you upload a screen shot of the zone file for this domain I can show you what needs changing.
    UK Web Hosting | Reseller Hosting | VPS | Domain Registration | Affiliates
    100% Cloud Powered | 30 Day Money Back Guarantee | cPanel | 365 Day UK Support
    https://www.ljshost.com

  8. #7
    Join Date
    Oct 2013
    Posts
    20
    Thanks
    4
    Thanked 1 Time in 1 Post
    Thumbs Up/Down
    Received: 0/0
    Given: 8/0
    Quote Originally Posted by kevinhng86 View Post
    I do not think you can point a folder to another hosting provider. I don't think DNS record allow you to point a folder to an ip, DNS only allow you to point the URL itself but not the fragment of it which is the folder structure. However I think you can point the sub-domain to a difference server and then use mod-rewrite or redirect your folder to your sub-domain.

    For Cpanel edit of DNS record check out this link https://documentation.cpanel.net/display/ALD/Edit+DNS+Zone.

    In Cpanel click on simple DNS zone editor. You will get that screen in the image. In the name box of add an A record put in the sub-domain name. In the address box of add an A record is the I.Pv4.0 address of the hosting server. After fill in that two box you can click add an A record.

    Name:  Screenshot from 2017-01-12 01:21:23.jpg
Views: 53
Size:  52.7 KB

    For redirection you need to use .htaccess file with rewrite engine. You can add the below to the .htaccess file on your web-root directory.
    Code:
    Options +FollowSymLinks
    RewriteEngine On
    Redirect 301 /myblog http://myblog.yourdomain.com/
    I don't think it is simple like that. Thanks for guiding me.
    This should add in cPanel of a domain, not in WHM, right?

    Quote Originally Posted by LJSHost View Post
    If you upload a screen shot of the zone file for this domain I can show you what needs changing.
    Is this the zone file? here is mine

    Name:  dns-zone-file.png
Views: 23
Size:  133.7 KB

  9. #8
    Join Date
    Jul 2016
    Location
    Hertfordshire, UK
    Posts
    656
    Thanks
    33
    Thanked 149 Times in 130 Posts
    Thumbs Up/Down
    Received: 292/2
    Given: 113/3
    That does not seem to be the correct zone file.
    It needs to be the zone file from the domain that has the sub domain you want to point somewhere else.

    WHM creates addon domains as a redirected subdomain for the domain but sub domains are still sub domains.

    for example subdomain.domain.com you would need the zone file for domain.com
    UK Web Hosting | Reseller Hosting | VPS | Domain Registration | Affiliates
    100% Cloud Powered | 30 Day Money Back Guarantee | cPanel | 365 Day UK Support
    https://www.ljshost.com

  10. #9
    Join Date
    Jan 2017
    Posts
    36
    Thanks
    2
    Thanked 18 Times in 12 Posts
    Thumbs Up/Down
    Received: 29/0
    Given: 32/0
    Quote Originally Posted by elzorro View Post
    I don't think it is simple like that. Thanks for guiding me.
    This should add in cPanel of a domain, not in WHM, right?



    Is this the zone file? here is mine

    Name:  dns-zone-file.png
Views: 23
Size:  133.7 KB
    With that panel style, under the add new entries, the first white box just put in your subdomain name. The select box should have an record mention something in regard to A, Cname, etc. Choose A. After that it will probably produce a white box somewhere. Type the I.P in that white box. For Ipv4 server use the A name record. For Ipv6 server use AAAA record.

Newer Threads

  1. forumrating
    Gecko
    Replies: 5 | Views: 44
    Last post by Gecko, 01-12-2017, 03:02 AM
  2. forumrating
    Godaddy heavy pricing
    By forumrating in forum Domain Names
    TheHost
    Replies: 5 | Views: 104
    Last post by TheHost, 01-15-2017, 01:25 PM
  3. forumrating
    Gecko
    Replies: 1 | Views: 49
    Last post by Gecko, 01-12-2017, 03:25 AM
  4. AnnaBlanch
    Namerie
    Replies: 8 | Views: 121
    Last post by Namerie, 01-12-2017, 04:21 AM
  5. energizedit
    24x7CSM
    Replies: 2 | Views: 134
    Last post by 24x7CSM, 01-12-2017, 02:50 AM

Older Threads

  1. wpspeedster
    LJSHost
    Replies: 7 | Views: 171
    Last post by LJSHost, 01-13-2017, 09:12 PM
  2. harrygreen90
    GswHosting
    Replies: 2 | Views: 123
    Last post by GswHosting, 01-11-2017, 07:16 PM
  3. harrygreen90
    DDoS protection service?
    By harrygreen90 in forum Dedicated Server
    RDO Servers
    Replies: 6 | Views: 306
    Last post by RDO Servers, 01-12-2017, 12:06 PM
  4. harrygreen90
    eva2000
    Replies: 8 | Views: 239
    Last post by eva2000, 01-15-2017, 01:08 AM

Latest Threads

  1. David Beroff
    David Beroff
    Replies: 0 | Views: 8
    Last post by David Beroff, Today, 02:39 AM
  2. WPCycle
    WPCycle
    Replies: 2 | Views: 35
    Last post by WPCycle, Yesterday, 08:47 PM
  3. steitieh
    Gecko
    Replies: 5 | Views: 47
    Last post by Gecko, Today, 02:17 AM
  4. steitieh
    energizedit
    Replies: 1 | Views: 80
    Last post by energizedit, Yesterday, 02:51 PM
  5. wpspeedster
    wpspeedster
    Replies: 3 | Views: 149
    Last post by wpspeedster, Today, 03:54 AM

Similar Threads

  1. Mihai B.
    meetdilip
    Replies: 3 | Views: 449
    Last post by meetdilip, 04-19-2016, 06:56 PM
  2. alwolsten
    alwolsten
    Replies: 0 | Views: 494
    Last post by alwolsten, 07-24-2015, 03:44 PM
  3. Joseph_Hill
    NickTheMusketeer
    Replies: 2 | Views: 782
    Last post by NickTheMusketeer, 01-19-2015, 02:27 PM
  4. Joe S.
    dandeedo
    Replies: 8 | Views: 1310
    Last post by dandeedo, 11-27-2014, 05:53 AM
  5. marco
    marco
    Replies: 9 | Views: 2405
    Last post by marco, 10-04-2014, 06:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Web Hosting Forum

ForumWeb.Hosting is a web hosting forum where you’ll find in-depth discussions and resources to help you find the best hosting providers for your websites or how to manage your hosting whether you are new or experienced. You’ll find it all here. With topics ranging from web hosting, internet marketing, search engine optimization, social networking, make money online, affiliate marketing as well as hands-on technical support for web design, programming and more. We are a growing community of like-minded people that is keen to help and support each other with ambitions and online endeavors. Learn and grow, make friends and contacts for life.

Community

The world's smartest hosting providers come here to discuss & share what's trending in the web hosting world!
Copyright ©2017, ForumWeb.Hosting. All rights reserved. Web Hosting Forum for webmasters, web hosting providers, designers and web developers.

Welcome to Forum Web Hosting

The World's Number 1 Web Hosting Community, Reviews & Services

Log in!

Continue with Facebook
Continue With Email. By signing up you indicate that you have read and agree to the Terms of Service and Privacy Policy.

Sign in Manually

Need an account? Sign up now!