zaro

How to Create a Subdomain DNS Record?

Published in DNS & Records 3 mins read

To create a subdomain DNS record, you need to access your DNS management settings and add a new record specifying the subdomain and its corresponding IP address or target. Here's a detailed breakdown:

  1. Access Your DNS Management Settings:

    • Log in to your domain registrar's website (e.g., GoDaddy, Namecheap, Google Domains) or your hosting provider's control panel (e.g., cPanel, Plesk).
    • Navigate to the DNS management section. This section might be labeled as "DNS Zone Editor," "DNS Settings," or something similar.
  2. Add a New DNS Record:

    • Locate the button or link that allows you to add a new DNS record. It often says "Add Record," "Create Record," or a similar phrase.
    • You will be presented with options to specify the record type, name, and value.
  3. Configure the DNS Record:

    • Record Type: Choose the appropriate record type based on what you want the subdomain to point to:

      • A Record: Points the subdomain to an IPv4 address (e.g., 192.168.1.1). Use this if your subdomain needs to resolve to a specific server's IPv4 address.
      • AAAA Record: Points the subdomain to an IPv6 address (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). Use this for IPv6 addresses.
      • CNAME Record: Points the subdomain to another domain name (e.g., example.com). This is useful if you want the subdomain to mirror another website or service. Do not point a CNAME record at your root domain (e.g., example.com), but rather a specific subdomain.
      • Other record types might be relevant depending on your needs (e.g., MX for mail, TXT for verification).
    • Name/Host: Enter the subdomain you want to create. For example, if you want to create blog.example.com, you would typically enter blog in this field. The system will automatically append your main domain (example.com) to it. Some systems require the full subdomain name to be entered here (i.e. blog.example.com.).

    • Value/Target/Points To: Enter the IP address or domain name to which the subdomain should point.

      • For an A record, enter the IPv4 address (e.g., 192.0.2.1).
      • For an AAAA record, enter the IPv6 address.
      • For a CNAME record, enter the fully qualified domain name (FQDN) of the target (e.g., target.example.com). Remember to include the trailing dot (.) in the FQDN on some systems, this explicitly indicates that the name is fully qualified.
    • TTL (Time To Live): This value determines how long DNS servers cache the record. A lower TTL means changes propagate faster but can increase DNS server load. The default TTL is usually sufficient (e.g., 3600 seconds or 1 hour).

  4. Save the Record:

    • Click the "Save," "Add Record," or similar button to save your new DNS record.

Example Scenario:

Let's say you want to create a subdomain called blog.example.com that points to the IP address 192.0.2.1.

Field Value
Record Type A
Name/Host blog
Value/Target 192.0.2.1
TTL 3600 (seconds)

After saving this record, it may take some time (up to 48 hours, but often much less) for the changes to propagate across the internet. You can use online DNS lookup tools to verify that your subdomain is resolving correctly.