Hi,
I need some help with understanding the setup made when hosting a website and registering a domain for that website.
I'll assume 2 scenarios, which at the end may point to the same situation.
Scenario #1
I join a free host service, and upload my web page. Let's imagine the host is http://www.freehosting.com, and after registering for the service, I have the following address to access my web page:
http://mysite.freehosting.com <-- In here they give me a subdomain name
or
http://www.freehosting.com/mysite <-- In here they give me a sub-folder where I have my work
I don't like those names, and I want to create a domain of my own. So, I go to a registrar and create a domain named: mydomain.com
Now here comes my questions ... how will I link the domain name to the host service provider?
I mean, if my registrar gives me a DNS service (which some don't, but the vast maiority do, I think), they can give me their DNS id, something like:
ns1.myregistrar.com
ns2.myregistrar.com
Then I give them to my host provider? What will they do with them?
Shouldn't I just configured the host IP or something like that on the DNS server of my registrar? Something like point "www" A record to some IP my host gives me ...
Scenario #2
I'll have a server on my local network. It'll be behing a router, and on the router I'll forward port 80 to the server (which is 192.168.0.1).
On the server, I have many web applications. Let's imagine one for each user, for a total of 3 users, and another with the public webpage. I can access them on my local network using:
http://192.168.0.1/user1
http://192.168.0.1/user2
http://192.168.0.1/user3
http://192.168.0.1/www <-- This is the public webpage web application
(http://server.mydomain.local/... since my server is the machine name and mydomain.local is the domain name. LAN DNS resolve it nicely)
I go to a registrar and register the mydomain.com. Imagining that my registrar gives me a DNS service, I would like to point:
http://www.mydomain.com to the local LAN http://192.168.0.1/www
http://user1.mydomain.com to the local LAN http://192.168.0.1/user1
...
I imagine I could point "www" A record to my WAN IP, and I would have http://www.mydomain.com/www, http://www.mydomain.com/user1 ... working out-off-the-box ... but I would like to configure it as I said ... subdomain www to webpage, then user1, user2, user3 for each user webapp ...
It's a bit similar to the scenario #1. How will I do that? Do I have to do that on my LAN site? Where should I mess things up?
Those might be some simple/basic questions, but it's a bit that I'm missing to understand how this works and the setup involved.
Thank you
I need some help with understanding the setup made when hosting a website and registering a domain for that website.
I'll assume 2 scenarios, which at the end may point to the same situation.
Scenario #1
I join a free host service, and upload my web page. Let's imagine the host is http://www.freehosting.com, and after registering for the service, I have the following address to access my web page:
http://mysite.freehosting.com <-- In here they give me a subdomain name
or
http://www.freehosting.com/mysite <-- In here they give me a sub-folder where I have my work
I don't like those names, and I want to create a domain of my own. So, I go to a registrar and create a domain named: mydomain.com
Now here comes my questions ... how will I link the domain name to the host service provider?
I mean, if my registrar gives me a DNS service (which some don't, but the vast maiority do, I think), they can give me their DNS id, something like:
ns1.myregistrar.com
ns2.myregistrar.com
Then I give them to my host provider? What will they do with them?
Shouldn't I just configured the host IP or something like that on the DNS server of my registrar? Something like point "www" A record to some IP my host gives me ...
Scenario #2
I'll have a server on my local network. It'll be behing a router, and on the router I'll forward port 80 to the server (which is 192.168.0.1).
On the server, I have many web applications. Let's imagine one for each user, for a total of 3 users, and another with the public webpage. I can access them on my local network using:
http://192.168.0.1/user1
http://192.168.0.1/user2
http://192.168.0.1/user3
http://192.168.0.1/www <-- This is the public webpage web application
(http://server.mydomain.local/... since my server is the machine name and mydomain.local is the domain name. LAN DNS resolve it nicely)
I go to a registrar and register the mydomain.com. Imagining that my registrar gives me a DNS service, I would like to point:
http://www.mydomain.com to the local LAN http://192.168.0.1/www
http://user1.mydomain.com to the local LAN http://192.168.0.1/user1
...
I imagine I could point "www" A record to my WAN IP, and I would have http://www.mydomain.com/www, http://www.mydomain.com/user1 ... working out-off-the-box ... but I would like to configure it as I said ... subdomain www to webpage, then user1, user2, user3 for each user webapp ...
It's a bit similar to the scenario #1. How will I do that? Do I have to do that on my LAN site? Where should I mess things up?
Those might be some simple/basic questions, but it's a bit that I'm missing to understand how this works and the setup involved.
Thank you