Set up Redirect From Internal Sub-Domain to External URL

Hi EE peeps!

We have a teamviewer URL that users can go to in order to download the quicksupport tool. The problem is, the URL is complicated for numbskulls and so I want to dumb it down with something simpler to understand.

Ex:
URL for teamviewer is https://get.teamviewer.com/companyremote
We want people to go to support.company.com and have it redirect to the teamviewer URL. The problem with using the sub-domain is I don't know what IP to enter into DNS. Would I then make it company.com/supprt?

I can't figure out if a 301 redirect is ideal or a CNAME change.
LVL 6
Paul WagnerFriend To Robots and RocksAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scot HalvorsenCommented:
You are going to need a 301 redirect and a CNAME DNS entry to make this work.

In DNS you will need the following;
support.company.com. CNAME www.company.com.

Then on the webserver that you specified in the CNAME, you will need to create a redirect;
#Apache Example
RewriteCond %{HTTP_HOST} ^support\.company\.com [NC]
RewriteRule (.*) https://get.teamviewer.com/companyremote/$1 [L,R=301]
Paul WagnerFriend To Robots and RocksAuthor Commented:
If I try to create the support.company.com sub-domain, the DNS host asks for an IP address. I'm not sure what IP address to enter.
Scot HalvorsenCommented:
This may be a limitation in your DNS service. It is perfectly acceptable to assign a subdomain that "you have control over" with a CNAME record.

What DNS service are you using?

If you have to absolutely assign an IP address, you can use the "ping" command to get the IP address of another domain. However, it is possible that this IP may change over time (Especially, if is not your domain.) This is why it is better to use a CNAME.
Webinar: Cyber Crime Becomes Big Business

The rising threat of malware-as-a-service is not one to be overlooked. Malware-as-a-service is growing and easily purchased from a full-service cyber-criminal store in a “Virus Depot” fashion. Join us in our upcoming webinar as we discuss how to best defend against these attacks!

footechCommented:
To do a redirect, you need a webserver (that's what does the redirect).  So you would need a DNS record for support.company.com to point to the webserver.  And then when someone reaches support.company.com they are redirected to the teamviewer URL.

You wouldn't need a CNAME record unless you already have the webserver with an A record pointing to its IP.

Though not strictly DNS, I believe some DNS providers provide the ability to create a redirect in their control panel, essentially doing the above behind the scenes.
Ramesh JangraCommented:
Don't do anything just create a index.php file on root of your subdomain and put below contents in file.

<?php
header("location:https://get.teamviewer.com/companyremote");
?>
David Johnson, CD, MVPOwnerCommented:
you don't create a subdomain in dns.. in your dns records you will have a list of your machines.. pick one to be a web server, add the web server role to that computer.
create a CNAME record sample cname recordon the web server in iis right click on sites and add a new site and add the binding support and also support.domain.com to the website and create the redirect in this site as previously explained
Paul WagnerFriend To Robots and RocksAuthor Commented:
Sorry to jump tracks, guys. Can I just create a 302 redirect in my website for company.com/support?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Paul WagnerFriend To Robots and RocksAuthor Commented:
I created a 302 redirect in my wordpress site for company.com/support and it was really easy.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.