Help me map my domain to my ip address
I need help mapping my domain to my ip address. I am a complete novice and need someone to be very clear what I need to write.
Let's suppose my ip address is 1.2.3.4, my domain is "google.com", and my hostname is "computer" (i.e. my command prompt looks something like me@computer:).
What should my first two lines of /etc/hosts look like?
Also, when I set an A/AAAA record, do I put "computer" in the Hostname field?
P.S. I am looking for a clear answer, not a link to a tutorial that I've already read, but didn't fully understand.
Thanks in advance.
3 Replies
You’ll want to go through this guide https://www.linode.com/docs/platform/manager/dns-manager/
I did. Please reread my post.
For the A record you'll want to leave the hostname blank if the DNS zone is for the domain in question. All records in the DNS zone are assumed to be for the domain the zone was created for, so leaving the hostname field blank will make a record for that domain.
For example, if the DNS zone is for 'example.com' and you want to point 'example.com' to 1.2.3.4, then when creating an A record the "Hostname" field will be blank and the "IP Address field will be 1.2.3.4.
For /etc/hosts, if you want to direct your Linode or local computer to look for 'example.com' at 1.2.3.4 then just add the following:
1.2.3.4 example.com
It'll work for any other combination of IP address and domain, as well.