Hosting a Subdomain?

Hey everyone, I own the domain monochromatic.co which I use to host a squarespace blog. I had been running a small side-website, on the subdomain console.monochromatic.co, off of github pages. This was just a little thing for hosting web apps and resources I find valuable, that don't quite fit into the scope of my blog.

I wanted to overhaul this page and host it on a linode server, along with a different subdomain (called "Rotonde"), but ran into some issues in the configuration process. I followed all the documentation to the T as best I could, so I figured I'd reach out and see if someone could tell me what I did wrong.

First off, is it possible to host two different subdomains (console.monochromatic.co and rotonde.monochromatic.co) off of the same server?

I tried to follow the guides as best I could, but it gets a little weird when I get to the DNS part. I’m not quite sure how subdomains should work for this, especially with the same IP address, without goofing up my main site.

Here’s what I did:

1. I followed the guides for initializing an Ubuntu server, and securing it.

2. I installed and configured Apache.

3. I created directories for the two sub-domains I was trying to initialize on the server, rotonde.monochromatic.co & console.monochromatic.co, at /var/www/html/rotonde.monochromatic.co & /var/www/html/console.monochromatic.co respectively. (should the subdomain go in place of the "www" directories?…)

4. I also created a /log/, /backups/, and /publichtml/“” directories.

5. I created and edited two host files for the respective websites.

6. I installed and configured MySQL and PHP.

7. I used FileZilla to upload files into both directories, to run the websites. This is the html files, the CSS, and cname files etc.

8. I added two domain zones listing the full intended URLs, and added default records.

Here’s where I get confused though. I already have some name servers (ns1 & ns2) pointing to Squarespace for my main site, and don’t want to affect that.

How would the NS records contradict one another given that they’re both NS1-5.linode.com? How about the IP address, since it's just the one for the server? Can I simply edit the IP address under the A Record tab, and link my subdomains to those at my registrar?

I have a small demo of what I'm trying to accomplish, roughly, at https://codepen.io/IanBattaglia/pen/OjEeKP.

Thanks in advance everyone, hopefully I can get this up and running soon! Sorry for my incompetence!

3 Replies

Hey, so first of all I do not recommend mixing the sources of the nameservers. I would recommend either using the ns1.domain.com nameservers or the Linode nameservers, not both, since if you change the settings on one nameserver but not the other, different domain zones will be referenced.

Instead, you should just be able to set up the subdomain to point to the Linode's IP address. What you can if you are using Squarespace's domain settings is add an A record with the host named "rotonde" and point it to the Linode's IP address, and that should resolve this for you. I'd recommend taking a look here:

https://support.squarespace.com/hc/en-u … S-settings">https://support.squarespace.com/hc/en-us/articles/205812348-Advanced-DNS-settings

Hope this helps!

-Steve C

To answer your first question, there is no problem hosting sub-domains on the same server, you can host as many as you want, even sub-sub-domains if you like (what.ever.is.this.example.tld, etc).

They can all point to the same IP address, the rest will be done by the server, to decide how to reply to requests. For example:

one.example.tld -> 192.168.1.1

two.example.tld -> 192.168.1.1

etc.example.tld -> 192.168.1.1

apache listens on 192.168.1.1 and by using SNI, it will reply as one of the above sub-domains.

I am not sure why the name servers confuse you. The top level domain (example.tld) has a set of name servers defined at the registrar, those name servers could be different hosting providers or just a single one (linode for example). All they do, is point to the same address (192.168.1.1 in my example). Very simple. It is also possible to setup a wildcard for your domain, so *.example.tld will cover all sub domains.

Sorry I can't help with ubuntu, I only use CentOS, which I believe is better suited for an internet server :)

Sorry this has taken me so long to respond to.

So I scrapped the "Rotonde" subdomain, as that project has moved in a different direction. I'm still trying to host "console" though. I removed the directories via filetransfer for anything pertaining to "rotonde" leaving only the "console" files.

Here's how it's set up.

Through Domain.com, I have two NS Records, ns1 + ns2, both pointing to monochromatic.co (My squarespace site).

I have an A record listed on Domain for console, pointing to my server, and carried the same record over in the linode manager.

Yet, the site is still not live. What am I missing?

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