All posts

Understanding URLs: Subdomains

This and the other “Deck” posts are a repurposing of flashcard study decks to Q&A blog posts. Google was not showing love to this content as a set of flashcards and I didn’t want to delete them entirely, I hope you find it useful.

What is a subdomain?

It is a prepended string that is added before the domain of a URL example: blog(subdomain)

What might you use subdomains for in a web application?

Subdomains are used as identifiers within an application often to differentiate between separate functions of an application or organizations. Separating by organization will most often be done in a B2B application eg: or There can also be multiple if needed:

What is a wildcard subdomain?

This is a DNS CName record with your hosting provider that points all traffic coming in from a subdomain to the root domain for example if there were wildcard subdomains enabled for, then both, and would point to

When is it more appropriate to use a URL path instead of a subdomain?

You will want to use a URL path ( instead of a subdomain ( when the resource is specific to the business function of your main application. Subdomains are used to identify very different functions from the core application or for different organizations accessing your application.

What is a non wildcard subdomain?

Here you would add a DNS CNAME record with your hosting provider for each subdomain you needed. In this case blog.devdecks and jobs.devdecks would have their own CNAME record, all other subdomains would not be recognized by the server.