-1

I want to connect my domain to my localhost server to be accessed remotely (not only on localhost). I have a static IP address available. When I type my static IP address into the browser from a remote network, it works fine. How do I connect a domain? Do I just put my static IP address as the nameserver?

1
  • You need to configure the nameserver to point the address to the domain in question then announce that information. In other words your nameserver needs to be accessible from outside of your network also.
    – Ramhound
    Commented Jan 7, 2016 at 15:08

1 Answer 1

1

No. The purpose of the nameserver is to serve DNS records. You could of course run your own nameserver (e.g. using nsd or bind9), but if your domain registrar offers their own, you should probably use that for now.

Instead, you need to change those DNS records to have your main server's IP address. If your domain uses the registrar's nameservers, they'll usually have a web-based control panel for that.

Specifically, you need to create or change the A (IPv4 address) type record under the main domain name – which is sometimes listed as @ in the control panel.

(If you also want a "www.mydomain" subdomain, also add it the same way. It's not automatic.)

Overall it should look like this:

NAME    TTL    TYPE    VALUE
----    ---    ----    -------
@       ...    A       1.2.3.4
www     ...    A       1.2.3.4

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .