0

I hope I phrased my question right, but I am hosting a web app on my server at home. I have a domain via Google Domains and I don't know how the DNS settings work.

I'm running the app on port 8082 and I'm using Google Domains for my domain. The app is built using Node.js

I have no experience using DNS whatsoever so I need all the help I can get.

1

You need to fulfill few requirements to do the above mentioned task.

If I understand correctly you need to use your personal computer as a server to host your NodeJS application that running on 8082 port on your local PC.

First of all you need to forward your local computers 8082 port to your public IP address of your home internet connection using your routers configuration. You can ask help for your internet service provider to do this.

Once you do the above task your application will be available to the public using your home internet connections ip address 8082 port. ( You need to allow access to the computers 8082 port in every firewall layer on your network, local computer & maybe in your router too )

then you can add A record in your Google domains portal to point specific sub-domain to your home internet connection's public IP address. This will take some time to propagate.

  • I have done all this, I can also access the webpages if I go to the ip with port as url, but an A record doesn't allow a custom port, and I'm running multiple apps from the same pc – Gido Selten Jul 19 at 21:31
  • 1
    you don't need to put port in the A record. just update the A record without any port & then type the port in the address bar when you are access it using browser. Ex : sub.example.org:8082 otherwise you need reverse proxy the requests to your application in local PC using nginx, apache. – Shyamin Ayesh Jul 20 at 14:00
  • how would I do that? because I don't want to use the port in the url – Gido Selten Jul 20 at 14:31
  • When you enter the URL into address bar it's hit your local PC's port (http) 80. so you have to forward that request to your application port 8082. This can be done via reverse proxy. Here is the nginx reverse proxy guide. Hope it'll help you. docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy – Shyamin Ayesh Jul 21 at 9:55
1

The default port for HTTP requests is 80. You can override the port by specifying in the URL by adding the port on the end as such; example.com:5500.

As described by user "Winter" here, you can use SRV records to cause a redirect.

  • What service and what protocol would I need to use? – Gido Selten Jul 22 at 1:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.