homepage Welcome to WebmasterWorld Guest from 54.196.201.253
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / Domain Names
Forum Library, Charter, Moderators: buckworks & webwork

Domain Names Forum

    
CNAME Domain Redirect
DNS newbie wondering if ...
le_gber




msg:3654333
 9:55 am on May 20, 2008 (gmt 0)

CNAME can be used to redirect a domain to another on the same server.

A client owns the .com and the .co.uk variation of a domain. The .co.uk is set up on our server. We told them to set up domain forwarding from .com to .co.uk but they changed the A record instead to point to the server.

I was wondering if, without physically setting the .com on our server we could add something like:

domain.co.uk IN A 1.2.3.4
domain.com IN CNAME domain.co.uk

on our server and if that would solve the issue. Or is that not the way CNAME are used for?

Thanks

le_gber

 

Romeo




msg:3654588
 4:02 pm on May 20, 2008 (gmt 0)

Hi le_gber,

there is no such thing in DNS as a 'redirect'.
A CNAME record is defining an ALIAS name to some other name. And somewhere that aliasing has to end at a real A record.
So having a direct A record in the first place instead of a CNAME is not bad per se, as it would probably save additional lookup overhead.

All records of a domain must be defined in that domain's authoritative zone, so for the two domains involved there are two different zones files, and just defining a foreign 'domain.com.' record within another domain's (domain.co.uk) zone, as you suggest, would have no effect as this would not be seen anywhere.

So what your customer did on his 'domain.com' end looks good to me.

Now that user requests for domain.com end at your HTTP-server, it is up to your HTTP server to handle these, perhaps by setting a HTTP 301 re-direct to avoid duplicate web content problems.

Another way so solve this could be to let the domain.com A record point to a HTTP-server at your customer's end and your customer sends HTTP 301 redirects to your HTTP server.

So to summarize:
- the .com domain has its own DNS records in an own zone file
- the .com name can either point to your server or the customer's
- he who gets that pointer has to set up a HTTP redirect to the other domain then

Hope that helps.
Kind regards,
R.

le_gber




msg:3687162
 8:37 pm on Jun 30, 2008 (gmt 0)

Hi Romeo,

thank you for your answer, and sorry I didn't reply earlier I was so busy working on clients' sites that I forgot I asked the question :)

thanks again.

le_gber

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Domain Names
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved