Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Sharing a Website Pick a Web Host

How does the Name-server in a DNS know the IP - Address

What does happen when a IP - Address changes? Where do we have to initially supply the IP -Address?

Thanks Gari;

1 Answer

Gari Merrifield
Gari Merrifield
9,597 Points

Someone, or some script, has to configure the IP address for a host name. There is also a reverse lookup in many cases.

The forward is referred to as an "A REcord", usually for something like host.example.com pointing to some IP address such as 192.168.1.1 An alias, or CNAME record is typically used to point other names to that host, such as www.example.com pointing to host.example.com A reverse or PTR record is based on the IP address, and gives a name back when queried.

When you pick a hosting provider, they usually have IP information for you when you set up an account. Some hosting is provided with a subdomain name, such as Homestead, others you must have your own domain name and a DNS provider. For example, Digital Ocean, asks you for a host name when you set up a Droplet with them. So if you had the domain example.com, maybe you would name your server server1.example.com, which would place that name in their reverse DNS for the IP assigned to your Droplet. You then would go into your DNS for your domain and add server1 with the IP they gave you. Godaddy and Digital Ocean both have DNS hosting available, as I am sure others do. But you MUST have DNS hosting somewhere, and your registrar must know where that is for your domain to work.

If you move your website to another hosting company, or set up a new server on a new IP, you will have to go in and manually change that pointer on the A record to the new IP address.

These are just some basics, but should get you started in the correct direction.

Note : I have not watched the video, nor taken that course, because I don't think I could stay awake for it, as I have been running my own domains and websites for more than 20 years, so I hope that this covered your intended question.