Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CNAME Website Redirect

Posted on 2010-09-09
12
Medium Priority
?
1,392 Views
Last Modified: 2012-05-10
Good Morning,
    We have a vendor hosting a website for us on their domain, and I want to add a redirect(alias) to it in our DNS.  Let's assume the vendors domain is vendor.com, and or domain is domain.com.  The website is askdomain.vendor.com, and I wanted to do a redirect from ask.domain.com.  I made a cname record that points ask.domain.com to askdomain.vendor.com, but it's not working.  Am I missing a key point of CNAME redirects?  

Mic

0
Comment
Question by:MVLAHelpdesk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
  • +1
12 Comments
 

Author Comment

by:MVLAHelpdesk
ID: 33636766
Some more details, it's not working meaning when I visit http://ask.domain.com it comes up with a 404 not found, but when I visit askdomain.vendor.com it comes up.  
0
 
LVL 29

Expert Comment

by:Jan Springer
ID: 33637358
The CNAME record for ask.domain.com should point to askdomain.vendor.com.  Reload DNS to get the changes to take effect.
0
 
LVL 30

Expert Comment

by:Rich Weissler
ID: 33637377
I suspect the vendor is using a host header so that they can host MANY websites with the same IP address, based on the 'askdomain' portion of the address.  Your best bet might be to work with the hosting vendor to determine if they support what you are attempting to do, and may be able to add your host header ... alternately, you might need a webserver responding at ask.domain.com to perform a redirection.
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
LVL 71

Expert Comment

by:Chris Dent
ID: 33637700

> Am I missing a key point of CNAME redirects?  

Yes. No such thing.

DNS does not redirect. What you have there is an Alias. The request will still reach the web server using the original name (ask.domain.com). Therefore the web-server must be willing to answer on that name.

If it is not, you must find another web server to redirect the request.

Chris
0
 

Author Comment

by:MVLAHelpdesk
ID: 33638328
So what's our best option?  A local redirect seems easiest.  Just put a HTML page with the redirect on our webserver, but that's adding another link in the chain.  Is there a DNS based solution?

MIc

0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 33638385

No, DNS will not redirect for you. DNS cannot modify the address you type into an address bar in any way.

Either the web server you talk to needs to answer on the name you're using, or you need to have another web server in the chain.

This is a very common misinterpretation of the CNAME record. It aliases one name to another on the DNS level, it doesn't do anything for "stuff" that operates outside of DNS, such as web services or browsers.

Chris
0
 
LVL 29

Expert Comment

by:Jan Springer
ID: 33638448
Yes and no.  Technically, the author needs both the CNAME and the Server Alias within the webserver configuration *or* the webserver needs to rewrite the HTTP_HOST.
0
 

Author Comment

by:MVLAHelpdesk
ID: 33638556
I'm a little confused.  I thought, user types ask.domain.com into his web browser.  Computer forwards DNS Request to domain.com's Name Servers which respond with the CNAME record, back to the computer.  Computer sends a second DNS request then to the domain name server listed in the CNAME reply, in this case, askdomain.vendor.com, whicih replies with the IP Address for the A record queried.  Can someone detail out the DNS Flow that is correct for a CNAME?
0
 
LVL 71

Accepted Solution

by:
Chris Dent earned 500 total points
ID: 33638694

It's not quite what happens, but it's near enough.

The trouble is, you're expecting what happens in DNS to have some kind of impact on the browser, and it won't.

Ultimately you'll get the IP address for the final A record back. However, any HTTP requests will be submitted with the typed address, not the target of a CNAME.

Chris
0
 

Author Comment

by:MVLAHelpdesk
ID: 33638783
So what's my best option then?  I can't believe this is that unique of a situation.  They are hosting our site, however we want it to be accessible from our domain name, and appear to be at our domain.  

0
 
LVL 29

Expert Comment

by:Jan Springer
ID: 33638802
You want them to set up a ServerAlias record in virtual host container (or whatever the equivalent is with what they're running) within their webserver configuration.

This should be a no brainer for them.
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 33639522

Agreed, on the hosting side this kind of request is extremely common. It's not that you're asking for something out of the ordinary, only that you're looking in the wrong place (DNS instead of the web host).

Chris
0

Featured Post

Q2 2017 - Latest Malware & Internet Attacks

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out our latest Quarterly Internet Security Report!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question