Skip to content
ferkesh.HOSTING

How to Create a CNAME Record for a Subdomain

Domains and DNS 66 次浏览 Markdown
Diagram linking Alias name, CNAME target, Target address and Website mapping.

A CNAME points one DNS name to another DNS name. For example, docs.example.com might point to a hostname provided by a documentation platform. Enter the target hostname supplied by the platform. A CNAME target is not an IP address, an HTTPS URL or a path.

Add the alias in the active zone

Find the authoritative DNS provider. Identify the record owner and target separately. For the example above, create CNAME at docs in the example.com zone and use the platform’s assigned hostname as its value. Preserve any previous record values so you can undo the change. A standard CNAME cannot coexist at the same owner name with normal record data such as A, AAAA or MX. If those records provide a working service, identify their purpose before editing them.

Check the alias and the application

Look up the CNAME and confirm the target is the one the platform gave you. The platform may also require you to verify control of the hostname and attach it to a site. Open the original alias in a browser once the platform has accepted it. A redirect to another address is a separate application behavior. A DNS alias alone keeps the address bar on the alias entered by the user.

When a provider asks for an apex alias

A conventional zone apex already needs records such as NS and SOA. Use the published apex method offered by the DNS or application provider, such as a supported flattened alias or an A record. Confirm the method before replacing the zone’s existing records.

An apex hostname has different constraints from a subdomain. Review CNAME flattening at the domain apex before choosing the record type.

Official references

Ferkesh Hosting. Last reviewed .

这对您有帮助吗?

感谢您的反馈!

仍需帮助?

如果知识库未能解答您的问题,支持团队全天候为您服务。