Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 389
  • Last Modified:

DNS Redirection Operation Confirmation?

I just need a quick conformation that I understand DNS redirection's functionality/limitation.  

I have a client that wants the following redirection (the domain is the same in each example and in reality):

city.domain1.com to www.domain1.com/City

It's my understanding that I could do the following:

city.domain1.com to www.domain1.com

Then the web server hosting the site would have to read the http header then direct the request to www.domain1.com/City

Do I have this right or is there some way to use DNS to do the requested redirection (city.domain1.com to www.domain1.com/City)?
0
dmbishop
Asked:
dmbishop
1 Solution
 
PapertripCommented:
You are correct.  You can either create a CNAME record that points city.domain1.com to www.domain1.com or create A records for city.domain1.com and www.domain1.com that point to the same IP.

Pros/cons of CNAME vs A for this scenario:
You cannot have a CNAME alongside any other RR (resource record) type.  This means if for example you need to add MX records for city.domain1.com or a TXT record for SPF or Google Site Verification you will not be able to.  The pro for a CNAME is that if www.domain1.com changes its A record you will not need to modify anything for city.domain1.com.

Cons of A record is that you will need to update the A record of city.domain1.com if www.domain1.com changes it's A record.  The pro is that you can have other RR's with the same label such as SPF or MX records.

If city.domain1.com will only be used as a redirect for www.domain1.com/City , then a CNAME should suffice.
0
 
dmbishopAuthor Commented:
Thanks for the quick and thorough confirmation and additional information regarding using CNAME vs. A records.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now