Launching a website with a personalized domain name requires configuring specific DNS records. This article outlines the distinct roles of A and CNAME records, how they interact with root and subdomains, and the verification steps necessary to ensure your application is accessible via its new address.

Preparing Your Domain for Custom Hosting

Suppose a freelance designer named Alex is preparing to launch a portfolio site on a custom domain. Alex has registered the name example-portfolio-dot-com and now needs to point it toward a new hosting provider. This scenario illustrates how specific DNS entries function during that setup phase.

First, Alex identifies the server’s static IP address, which is provided by the host as one-nine-two-dot-zero-two-one-dot-four-five-six. To direct the main website traffic, Alex creates an A record. In this entry, the host field is left blank or set to the at-symbol to represent the root domain. The value field contains the full IPv4 address. This record tells browsers exactly where to find the web server for the primary URL.

Next, Alex wants the www-subdomain to resolve correctly without managing two separate IP addresses. Instead of creating another A record with the same numeric string, Alex sets up a CNAME record. Here, the host field is explicitly typed as www. The value field points to the bare domain, written as example-portfolio-dot-com. This alias ensures that any request for the www version automatically redirects to the A record’s target. If the hosting provider changes the underlying IP later, Alex only updates the single A record, and the www subdomain follows suit automatically.

Alex also considers email routing but decides to hold off on MX records until the mail service is fully configured. For now, the focus remains strictly on web accessibility. The choice between using an A record for the root and a CNAME for the subdomain reflects standard practice for static sites hosted on shared infrastructure. It simplifies maintenance while ensuring both variants of the URL load the correct content. Once these two entries are saved in the DNS dashboard, Alex waits for propagation before testing the live link.

Understanding the Role of A Records

An A record maps a domain name to an IP address. According to Microsoft Learn, when setting up a custom domain for a web app, you can create either an A (address) record or a CNAME (canonical name) record; the A record connects the domain directly to the numeric IP address. The same guidance notes that if the IP address changes, the A record must be updated, whereas a CNAME entry would remain valid.1

It also states that some domain registrars do not allow CNAME records for root or wildcard domains. In that case, an A record must be used instead.1

You can use one A record as the main path from a domain to a single IPv4 address. Before adding it, check whether the hosting page you already have names a current server address rather than an older one; if two addresses appear, consider keeping a short note of which page and date each came from. Then you might write the record as a host label, record type, address, and a note. For a current launch entry, a filled example could read: host “@”, type “A”, value “the IPv4 address listed on the hosting account page”, note “current address, checked today”. For an archived entry, the same fields might read: host “@”, type “A”, value “the previous address”, note “replaced, retained for comparison”. The change is not in the field names but in whether the note describes an active target or a retired one.

You can also decide whether the bare domain and the www name should share that same A target or be handled separately; either choice is yours, and a one-line reason beside each entry makes the decision easier to revisit. If the address is uncertain, consider pausing the entry rather than guessing, since an A record pointing somewhere unintended sends visitors away from the site you prepared.

Configuring CNAME Records for Subdomains

For the www name, the Azure tutorial uses a CNAME record instead of a second A record. It states the CNAME should point to the A record, and in the example the www-ed record has the type CNAME, a TTL of 600 seconds, and its alias set to the web app's default domain name, such as contoso.azurewebsites.net. The record is added in the DNS zone's record set flow by choosing add, then entering the name www and the type CNAME.2

The same page lists a CNAME record for the www name among the three records required to add a custom domain to a web app: root A, root TXT for verification, and CNAME for www.2

For the subdomain step, Alex can draft a small CNAME worksheet before touching any settings: columns for the host name, the target, and the reason for the choice. A filled row might read “www,” target “example-portfolio-dot-com,” reason “send visitors to the main site.” A second row for “portfolio” pointing at the same name would let Alex keep the main address as the single place to update later.

Alex might then compare two candidate phrasings on paper: the www name as a CNAME, or the www name as its own A record using the same numeric address as the main site. Writing both rows first makes the tradeoff visible; Alex can keep whichever is easier to explain in a short note and leave the other row unused.

If Alex later renames or removes a subdomain, the worksheet still shows which row to revisit. You can keep this sheet beside the account notes and mark each row as current or retired, so correspondence about the site setup and your own record of decisions stay easy to match.

Handling Root Domain Constraints

For the root domain, the source notes that some registrars do not allow CNAME records to be used for the root domain or wildcard domains. In that situation, an A record must be used instead. This is stated as a limitation tied to certain registrars, not a rule for every domain or provider.1

The source's broader comparison is that an A record maps a domain name to an IP address, while a CNAME record maps a domain name to another domain name. It adds that if the IP address changes, the CNAME entry remains valid, but the A record must be updated. Before publishing, the source also advises testing your domain name.1

For Alex's root domain, the practical step now is to draft a short constraints note before editing any records. You can set it out as three columns: the name you want to use, the record type you are considering, and the limitation you noticed. A filled row might read "bare name, A record, host gave one fixed address and I cannot point the root at a name." A second row could read "www, CNAME, target is another name rather than a number." These entries are your own working notes, not a claim about what any provider requires.

Once the note exists, you can compare the bare name and the www name side by side and decide whether they should behave the same way or differently. If the two rows look identical, consider whether keeping two separate entries adds anything; if they differ, the note already shows which one needs the closer look. You might also add a fourth column for the decision, filled with "keep," "revisit," or "drop," so the sheet stays useful when you return to it later.

When a record is removed or renamed, you can return to the same row and mark it rather than starting a fresh page. That keeps the history of your choices in one place, which matters most for the root name, since it is the one visitors type first.

Verifying Record Propagation and Access

Verification in the documented exercise is read-only and separate from creating the record. After the record set is added, the page describes using the nslookup tool in Cloud Shell to check whether the DNS zone works as expected, even without a registered domain.3

The command takes two inputs: the zone name to replace, and one of the name server addresses copied from the NS values recorded after the zone was created. The example uses the host name www.wideworldimportsXXXX.com followed by a name server such as ns1-04.azure-dns.com. According to the page, the host name should then resolve to 10.10.10.10, the address entered for the A record.3

Alex can turn the launch worksheet into a small verification log before the site goes live. Add four example columns and fill them with notes, not results: record name (www), saved target (example-host-dot-net), what Alex expects to see (the portfolio home page), and the date and time of a planned check. Keep the same four columns for a second row, the bare name, with its saved target and expected page. If an archived entry exists, Alex can add a row for it too, using the old target and the page it once showed, then mark it clearly as archived rather than current.

You can decide which row to check first and where to note the outcome. A filled example might read: www, saved target noted, expected portfolio home page, planned evening check. For the root row, the same fields apply, with the expected page named explicitly. This keeps the comparison about Alex's own records and expectations, not about any outside confirmation.

When a check is planned, Alex might also note one alternative access path to try later, such as the www name if the bare name does not reach the expected page. Treat that as a contingency entry, not a confirmed result. If the expected page appears, mark the row reviewed; if not, leave it open and add a short note about what differed. The log stays a personal record of choices and planned checks, and Alex can revise the columns as the launch preparation evolves.

Finalizing Host Name Bindings

For the custom domain to serve a web app, Microsoft's tutorial requires an A record at the root and a CNAME record for the www name; the CNAME points to the app's default host name. In the Azure portal, you open the DNS zone, choose record sets, add a record, set Name to @ and Type to A for the root, and enter the web app's IPv4 address. The same record-set page creates the www entry with Type set to CNAME and the app's default domain name as the alias.4

Before making any further record changes, Alex can turn the existing worksheet into a short handoff note for the final host-name binding. A useful format is three columns: what the record is meant to do, which name it belongs to, and the next action. A filled example might read: main site points to the host, bare domain, wait for the confirmed address; www opens the same home page, www name, decide between a separate record and an alias.

You can then mark each row as one of three plain states: still undecided, ready to enter, or entered and awaiting a check. This keeps the two names visibly separate without implying that either one is already live. Alex might add a brief reason beside the www decision, such as preferring one editable target if the host address changes later, or choosing a second direct record to keep the two names independent.

If a name is dropped from the plan, you can leave the row in place and note why, so a later reader sees the history rather than an unexplained gap. The note stays a personal planning aid; it does not replace whatever instructions the hosting page provides.

Frequently asked questions

Before adding the main A record, how can I check which server address note to use?

You can use one A record as the main path from a domain to a single IPv4 address. Before adding it, check whether the hosting page you already have names a current server address rather than an older one; if two addresses appear, consider keeping a short note of which page and date each came from.

How can I draft a small CNAME worksheet before changing any settings?

For the subdomain step, Alex can draft a small CNAME worksheet before touching any settings: columns for the host name, the target, and the reason for the choice. A filled row might read “www,” target “example-portfolio-dot-com,” reason “send visitors to the main site.”

How can I lay out a short constraints note for the root domain before editing records?

For Alex's root domain, the practical step now is to draft a short constraints note before editing any records. You can set it out as three columns: the name you want to use, the record type you are considering, and the limitation you noticed.