Can I forward a subdomain to an external website?

Discussion in 'General' started by schwim, Apr 30, 2019.

  1. schwim

    schwim Member HowtoForge Supporter

    Hi there,

    I use my domain host to point the domain to my server. I need to forward subdomain.domain.com to an external website but I'm not sure how to do this. The domain host seems to only allow the entire domain to an external website.

    Can I manage this with ISPC? If I point the subdomain to this server, can I then direct it to outsidesite.com/folder/index.php?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I'm not sure I understand what you have done and how you have done it. But it is possible to have domain.com go to somewhere and subdomain.domain.com go to your ISPConfig server, and then you can in subdomain.domain.com websites settings do redirect to outsidesite.com/folder/.
     
  3. schwim

    schwim Member HowtoForge Supporter

    Hi there Taleman and thanks for your help. I should have explained my situation better.

    I am using 101domain to use an A record for scotchandiron.org and www.scotchandiron.org to point to my ISPC-enabled server. I need to point vote.scotchandiron.org to point toward https://www.trackyserver.com/server/scotch-iron-234587

    I asked 101 via support and they stated that I need to handle this at my server, that I could not point it via any records at 101.

    So I am pretty sure that I need to create a new A record for vote.scotchandiron.org to point to my ISPC-enabled server but I don't know what to do after that. Can I do something on the server to point vote.scotchandiron.org to https://www.trackyserver.com/server/scotch-iron-234587?
     
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Correct on the first part, you would need to add an A record in dns for vote.scotchandiron.org with your ISPConfig server's address, which would have to be done at your dns provider (101domain). Then on your ISPConfig server you add a subdomain vhost for vote.scotchandiron.org, and under the Redirect tab set type to R=301,L and enter the destination under Redirect Path.
     
  5. schwim

    schwim Member HowtoForge Supporter

    Thanks for your help, Jesse!

    I'm looking in ISPC and I don't see anything regarding virtualhosts. I've looked in DNS and see the ability to create zones and under site, I see the ability to create a sub domain and under sites, I see the ability to create a subdomain for a local path but I'm not finding anything that looks like what you're explaining. Even when creating a new site for the subdomain, it shows an option for a redirect to a "path".

    How would I get to that?
     
  6. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    A subdomain vhost is a slightly different setup, but you are correct, you can add it right to a standard subdomain, and that is even simpler. Ie. Sites > Subdomain for website > Add new Subdomain, set the parent website and domain to 'scotchandiron.org', host to 'vote', redirect type to R=301,L and redirect path to the destination on trackyserver.com.
     
  7. schwim

    schwim Member HowtoForge Supporter

    Edit: worked like a champ, thanks so much!
     
    Last edited: May 1, 2019

Share This Page