Solved

CNAME Website Redirect

Posted on 2010-09-09
12
1,304 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
  • 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 28

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 29

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
 
LVL 70

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 70

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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 28

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 70

Accepted Solution

by:
Chris Dent earned 125 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 28

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 70

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I know all systems administrator at some time or another has had to create a script to copy file from a server share to a desktop. Well now there is an easy way to do this in Group Policy. Using Group policy preferences is not hard. The first thing …
I will assume you are running a non-server version of some sort of Windows throughout this article. There are many flavors of Windows since Windows Server 2000 - 2008, XP Home & Pro, Vista Home & Pro, and Windows 7 Starter, Home, Pro, Ultimate, etc.…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now