Subdomains

Subdomains (What)

A subdomain is an extension of a main domain name that allows Developers to organize different sections of their website under the same primary domain.

Examples:

The syntax is subdomain-name.main-domain-name.top-level-domain-nameNotice that the pattern is from specific to general.

Key Features of a Subdomain

  1. Hierarchy: A subdomain comes before your main domain name. It’s separated by a period (.).

  2. Independent Sections: Subdomains can function as separate sections of your site, allowing you to host different content, applications, or services.

  3. Custom Use: You can set up multiple subdomains for various purposes, like:

    • blog.don-elger.com for a blog.
    • store.don-elger.com for an online store.
    • jokes.don-elger.com for your dad-joke app.

Why Use Subdomains?

How Subdomains Work in DNS

A subdomain is configured in your domain’s DNS settings: * A CNAME record (or sometimes an A record) tells web browsers where to find the content for the subdomain. * For example, jokes.don-elger.com can point to a Heroku app using a CNAME.