1

I have a domain site mysite.com registered in a DNS server, I need register on DNS server a subdomain named for example hub.mysite.com for a Mercure hub service (running on a same webserver but with port 3000) associated to mysite.com domain???

Francisco
  • 141
  • 1
    Yes, you'd need a DNS record for the subdomain. – ceejayoz Sep 26 '22 at 16:10
  • 1
    or even no, using wildcard would enable all subdomains without a extra hassle. It might only require in case that the does not match the original destination – djdomi Sep 26 '22 at 17:56

1 Answers1

1

The Short answer:

Yes, you will need a IN A record.

but there are two options:

  • use a specific entry in your dns for just this sub domain
  • use wildcard and you won't need to create a new sub domain

at anytime you would like to use a new sub domain.

Mostly it is not recommended to use wildcard (*.example.com) in case you would use a proxy servlvice like cloudflare due it would leak the server ip.

but the good fact is, you will not need to create any sub domains aslong as the destination is the same ip for the same server

djdomi
  • 2,020
  • but remind that reaching the service 3000 on hub by using port 80/444 would require a reverse proxy – djdomi Sep 26 '22 at 18:03
  • For this case, a subdomain virtualhost specifications only require a reverse proxy rule?? Isn´t necessary DocumentRoot tag?? – Francisco Sep 26 '22 at 18:06
  • The domain name is registered on servers of the internet provider in my country, the thing is that I don't know if they accept wildcards (when I configure the VPS I will know). When I made the domain registration request through the authorized website, I indicated a domain name of the type mysite.com, without wildcard. – Francisco Sep 26 '22 at 18:19
  • take a look here but that was not on topic for this question, i just interpreted the read that out of your question – djdomi Sep 27 '22 at 04:29