How to set IP address as CNAME record for subdomain
Asked Answered
M

1

5

I've got an Amazon elastic IP. I've a subdomain like aap.myhosting.com and I wanna associate this IP address with 'app' sub domain. But when I change the CNAME and put the IP address as HOST for the subdomain 'app' I get the following error.

Please use only letters, numbers, dashes (-) or periods (.) followed by the appropriate web extension such as .com, .net, .org. Do not enter spaces or other punctuation. (example: abc-company.com)

The error is self explanatory but is there anyway I can set this IP as host for sub-domain?

Masseter answered 10/5, 2012 at 6:36 Comment(2)
A CNAME is an alias for another DNS record - it cannot point directly to an ip address. For that, you need an A or AAAA record.Autobiographical
Can you please elaborate a A and AAA records a little bit? thanksMasseter
D
17

CNAME is not designed to point a sub-domain to an IP address. You have to use the A record. If the sub-domain is already in the CNAME, then you have to delete it and then add it as an A record pointing to the IP address you want.

Duhl answered 10/5, 2012 at 6:40 Comment(3)
Can you please elaborate what A record is ? ThanksMasseter
A record is the pure ip->url record, cname is meant to be an alias, if the content is different between the domain and the subdomain you need to use A record, if it's the same, cnamePrefrontal
I made a server that only has an ip address and i want it to be able to have www so how do I do that?Gracchus

© 2022 - 2024 — McMap. All rights reserved.