How to create a subdomain at freenom.com?

独自空忆成欢 提交于 2021-02-06 11:33:52

问题


I created a domain at freenom.com https://imgur.com/a/ClaXVLX which points to my app at Digital ocean droplet. and next day I created this domain I tested and it works. that domain is 1) at printscreen above.

Now I want to create several subdomains, as I know that is possible to make:

site.com - domain
dev1.site.com, dev2.site.com - subdomains

But I do not know what must be entered in fields 2) and 3) ?

When I tried as at printscreen above I got error :

Error occured: Invalid value in dnsrecord

Which are valid values ?

Thanks!


回答1:


A domain name (for use as websites etc.) should point at an IP address. There are several kinds of DNS records. Records for pointing at IP addresses are A records, as you have in 1). Other kinds are MX records for mail servers, for example.

If you want to create a subdomain, you want to create another A record, so simply choose A for the "type" field.

Alternatively, if the IP is the same as an existing record, use a CNAME record which points to another record, e.g.

Name           Type    TTL    Target
dev1.site.com  CNAME   14440  site.com

This says that dev1.site.com should use the same record(s) as site.com, so if you ever update the A record of site.com, it will automatically apply to all subdomains too.




回答2:


The CNAME record type does not accept a IP number.

For the subdomains, use a CNAME, but make the target the @ sign, which represents the root domain.

To be clear, this will make both subdomains point to the IP address of the A record you specified for the root domain.

If you want the subdomains to point to a different IP, then use an A record instead of a CNAME record.




回答3:


I found the way to add two A record

A  www.dev2   IP (same ip of your original website)
A  dev2       IP (same ip of your original website)


来源:https://stackoverflow.com/questions/52810608/how-to-create-a-subdomain-at-freenom-com

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!