CNAME question

I have 5 domains on my server that I want to point to 1 domain so this 1 domain can be accessed via any of the 5 URLs. The point of this is the website on this one domain will determine which URL is being used to access it and provide data based on that. Say e.g. it's a property site and the domains are property-uk.com, property-usa.com, etc. so if I visit property-uk.com it will point (NOT redirect) to that single site and server all UK properties, etc.

I do, however, require the alias domains to be able to manage their own mailboxes, etc. so simply parking is not an option.

How can I make these 5 domains point to the master domain (call it property.com)? Would I add a CNAME record for these 5 domains so that www points to www.property.com.?
LVL 7
DarkHillAsked:
Who is Participating?
 
Chris DentConnect With a Mentor PowerShell DeveloperCommented:

Provided your web-site content doesn't use absolute URLs, if everything is relative then the original URL used will not change.

Chris
0
 
Chris DentPowerShell DeveloperCommented:

CNAME would work well enough provided the web server is willing to answer for those names (may be an issue if host headers are used).

You wouldn't see URL rewriting with that, but from the above I don't think you want or expect that anyway.

Chris
0
 
DarkHillAuthor Commented:
>> You wouldn't see URL rewriting with that, but from the above I don't think you want or expect that anyway.

What do you mean with that? I would require URL rewriting using .htaccess, e.g. URLs may be:

www.property-uk.com/property-details/1/name-of-property

and

www.property-usa.com/property-details/5/name-of-property-2
0
 
Chris DentPowerShell DeveloperCommented:

Sorry, badly phrased, you wouldn't see URL rewriting from anything done in DNS. e.g. rewriting www.property-usa.com to property.com. Once you're at the web server you can do whatever you need with the URLs, as long as the web server is willing to service the request.

Chris
0
 
DarkHillAuthor Commented:
That's perfect, as long as CNAME will enable visitors to see the various sites as INDIVIDUAL sites, i.e. as if the files were uploaded to each domain individually (instead of them being served from the main domain) and me being able to do the usual mod_rewrite functions, etc. I would be happy... Is this  the case?
0
All Courses

From novice to tech pro — start learning today.