如何将IP地址设置为子域的CNAME记录 [英] How to set IP address as CNAME record for subdomain

查看:116
本文介绍了如何将IP地址设置为子域的CNAME记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Amazon弹性IP.我有一个子域,如aap.myhosting.com,我想将此IP地址与"app"子域关联.但是,当我更改CNAME并将IP地址作为子域"app"的主机时,会出现以下错误.

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.

请仅在后面使用字母,数字,破折号(-)或句点(.) 通过适当的Web扩展名(例如.com,.net,.org).不要 输入空格或其他标点符号. (例如:abc-company.com)

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)

该错误是不言自明的,但是无论如何我可以将此IP设置为子域的主机吗?

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

推荐答案

CNAME并非旨在将子域指向IP地址.您必须使用A记录.如果该子域已经在CNAME中,则必须将其删除,然后将其添加为指向您想要的IP地址的A记录.

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.

这篇关于如何将IP地址设置为子域的CNAME记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆