Subdomain question

Hi,

One thing I noticed when attaching my domain to my Linode (I noticed this in the tutorial too) is that it seems to set up a mail.example.com, except that I did not register mail.example.com, I only registered the example.com bit. The tutorial also mentioned doing another subdomain (e.g. shop.example.com if you want a shop site). I am not an expert on domains and servers, but this seems a bit contradictory from what I've heard about registering domains?

5 Replies

You cannot register a subdomain. If you manage your own name server, you can create as many subdomains (and subsubdomains, etc) as you would like by editing your name server's config. If you use Linode's you can do this through the control panel (not sure how, I don't use theirs).

As for shop.example.com, that's a suggestion and is not mandatory. (Does amazon use a shop.amazon.com name?)

And as to mail.example.com, that's a suggestion and is not mandatory, though it is convention to have an MX record be mail.example.com.

(Typo: contention -> convention)

When you go to the DNS Manager and choose to Add a DNS Zone, there are two options in "Insert Default Records", for creating or not default records. If you want to create them, most common records such as the one for mail.example.com will be created. You don't need to register this subdomain in any company, just all subdomains under example.com are managed by your machine, once the requests to example.com are "redirected" to your server.

If you create a subdomain shop.example.com, then you can configure your webserver to show a shop, for example, with a different content than the website shown when visiting just example.com. Of course, you can install a shop at example.com as well. But the recommendation of creating a subdomain shop.example.com is only when you must separate a main website from a shop.

Imagine that you make a movie. Then, you have a website called mymovie.com. But in this website, you want to add a shop with merchandising about your film. Then you CAN (not MUST) create a subdomain called shop.mymovie.com. Of course, you could also install the shop under mymovie.com/shop/ or even register a totally different domain name for it.

I didn't say shop.example.com was mandatory, I was using the example from the tutorial. It did seem to require that my mail server be hosted on mail.example.com.

@Piki:

I didn't say shop.example.com was mandatory, I was using the example from the tutorial. It did seem to require that my mail server be hosted on mail.example.com.

A subdomain is just an "alias" for a server. You can redirect it to whatever IP you want. If you have a website called example.com which is in IP 1.1.1.1 but your mailserver is at 2.2.2.2, you can redirect example.com to 1.1.1.1 and mail.example.com to 2.2.2.2. Of course, calling the subdomain mail.* is not mandatory, but the most common way of configuring your email server.

@Piki:

I didn't say shop.example.com was mandatory, I was using the example from the tutorial.

Great, then it sounds like you're all set.

@Piki:

It did seem to require that my mail server be hosted on mail.example.com.

Any requirement is purely artifical.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct