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 trialJason Stewart
14,860 PointsHostname
I'm feeling pretty stupid right now. I'm trying to create a website. I have my domain registered on Namecheap and I have set up an account with DigitalOcean for hosting. It's asking to give a hostname to my new virtual server but I don't know what that means. If my domain name I bought is 'example.com' where does the hostname come into it?
4 Answers
James Barnett
39,199 Pointstl;dr - If you are setting up a single server to host a website then by convention the hostname would be www
.
Take this instruction for instance:
Once you have started the process to create a droplet, choose your server's name: The name you choose will then be your machine’s hostname. Make sure it is a FQDN that points to the droplet.
So this begs the question what exactly is a FQDN, it's a fully qualified domain name
- FQDN = hostname + domain name + top level domain
In the example www.example.com
- hostname: www
- domain name: example
- top level domain: com
jne
12,613 PointsThe hostname can be any name I believe. It's just something to call it.
Jason Stewart
14,860 PointsThanks for the response! I went ahead in the end and just named it a generic name to be safe.
cbcbcb
16,560 PointsIt doesn't matter what you name your local domain name. It won't affect the domain name you use for the website. I am going to ask...have you ever installed linux on a box at your house? If not I strongly suggest taking the time to do that before getting naked and traveling into the valley of remote administration of a linux box.
EDIT: Oooopsies....host name is appended to the beginning of your domain name...Same applies. Doesn't affect your website.
Jason Stewart
14,860 PointsHa I've been using the command line a bit on my laptop with Ubuntu but that's about it. I'm entering a whole new world right now and it's scary. Thanks for the response!
Shaun Sweet
259 Pointsget your webservers IP address and then go to the domain, find the zone file and point the @ record to the web servers IP address. IDK why you would be messing with a hostname.
cbcbcb
16,560 PointsDebian based distrobutions ask you to set a host & domain name for all installs. I think they leave parens after the prompt tha states it is optional...