Subserver doesn't work properly

Hi!

I just created a new sub-server under one of my existing domain. Everything was fine and I’ve also installed Wordpress on this sub-server.
But when I want to access to this sub-server, I have this error:

While trying to retrieve the URL: http://test.maindomain.com/

The following error was encountered:

  • java.net.UnknownHostException: Unable to resolve host “test.maindomain.com”: No address associated with hostname

The main domain works correctly. All the files for Wordpress are located into /maindomain/domains/test.maindomain.com/public_html

Any idea…?

I’d start to make sure the DNS record got created given the error.
image

Yes everything is active:

2023-03-22 12_19_41-Crypto

Since I’m more of a network guy, I’d suggest pinging the sub domain name.

The ping doesn’t work on the sub domain name but works on the main domain name.

I’ve checked the configuration in the DNS Records and everything seems correct with the correct IP Address too.

Last thing I can suggest would be use an outside tool to make sure it isn’t something with caching on your side. After that, try reloading or restarting bind. If you see the record then maybe bind didn’t reload properly. If there was something strange then it should be in the logs though.

What kind of outside tool? I tried to access to the subdomain with my phone and another connection but still the same.

And I’ve restarted BIND but no luck… very weird. It seems pretty easy to create a subserver. I don’t know why it doesn’t work -_-

I’ve created a couple of subs as forum dot whatever and they worked pretty much as expected.

Something like:
whatismyipaddress.com/hostname-ip

But if it doesn’t resolve to the outside world, then I’m stumped. Well, other than a dig @yournameserver. subdomain.whatever.

I can see the IP address of the main domain name but not with the subdomain.

If I try again I have this error:

This site can’t be reached

test.maindomain.com’s DNS address could not be found

Well… I don’t know then…

Thanks for your help tho!

You are using your own name servers? Right?

hum ^^ I’ve created many main domains without any issues. I guess that the subserver use the same than the main domain right?
The NS are the one from the registrar where my domain name is linked to my server IP.

Find out what name servers your main domain is on. The sub must go there.

kermit@~:dig xforge.com NS

; <<>> DiG 9.18.12-1~bpo11+1-Debian <<>> forge.com NS
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40970
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;xforge.com. IN NS

;; ANSWER SECTION:
xforge.com. 3600 IN NS ns1.xnetadmin.com.
xforge.com. 3600 IN NS ns0.xnetadmin.com.

;; Query time: 615 msec
;; SERVER: 209.18.47.62#53(209.18.47.62) (UDP)
;; WHEN: Wed Mar 22 14:43:09 EDT 2023
;; MSG SIZE rcvd: 91

Can I specify somewhere the NS for the subdomain? I saw that there is a “Server configuration Template” but all is by default.

You need to determine where your DNS is served from. It sounds like it may be your registrar. That is where you will need to add the sub domain at then.

just seems like you need to create a A for test

I’ve already have a A and a bunch of other Record Name…

If you getting that error normally mean its not got a A record.
With https://mxtoolbox.com/SuperTool.aspx use the DNS lookup and add test.maindomain.com
is it resolving ok there?

Can you just PM me , or someone else, the real domain name so I can check it? I really don’t think publishing a domain name here that you are trying to make public is any real security risk though. Problem is, it isn’t public. :wink:

But, until we know your actual name server I don’t think we can get much further.

When you went to create the subserver, you should have been on this screen:

Note the subserver tab is highlighted and all boxes checked.

Notice when you type “test” into the area for the name of the subserver, you get a list of possible domain configurations. If you click the very first one in the list, then it will be test.yourdomain.com. If you clicked on any different configuration the subserver can be in a different place in your structure.

Double check the actual name of the test domain you created and make sure you didn’t inadvertently name it test.test.yourdomain.com or something along those lines to where the A record you entered may be different from the actual subserver domain name.

Yeah I have the same screen and the subdomain was correct. There is no “test.test”. Everything seems correct for the configuration, it’s very weird…

But anyway, it’s not really important for now. It was just to create a temporary website for a customer. I will create a new server with the domain name and will see later if I need to create a real sub domain.

Thanks for your helps guys! If I find the solution, I will post it.