In this article, I'll walk you through one way that you can take your webpage and host it on your own server.
Why would you want that? And what's a "server" anyway?
When you visit websites on the internet, they are each hosted by a "server". A server is a computer located somewhere in the world that's connected to the internet, and that computer's job is to "serve" webpages to internet users that want to view them.
When you create webpages here on Khan Academy, it's the Khan Academy servers that are in charge of serving your webpages. That's nice of us, since you can share your webpages with friends for free, but there are some disadvantages: 1) your webpages have a bunch of Khan Academy user interface surrounding them, 2) your webpage has "khanacademy.org" in the URL, and 3) you can only create single webpages, not multi-file websites.
All of that is great when your goal is learning, but not ideal if your goal is to create a professional looking website, like a portfolio, resume, or shop.
When you develop webpages on your own computer, then you can create multi-file websites that aren't surrounded by Khan Academy UI - but the URL of your site looks like "http://localhost" or "file://...".
If you try sharing a URL like that with a friend and they try loading it on their computer, they'll be sad because they won't be able to see your website! Those URLs are "local" URLs, only viewable on your own computer.
So now you need a server to "host" your webpages, and that's where you have a lot of options. Many companies are "hosts" or "hosting providers", and they make money by letting people host your webpage files on their servers.
You might also want your own domain name - like "khanacademy.org" or "yourownname.com". You can buy those from a "domain name registrar", pay a small amount each year to keep them around, and then point that domain to your server. You can also learn more about domains, from the inventor of the internet himself!
You can search the internet for "hosting providers" and "domain name registrars" if you want to check out all the companies offering those services and see what their pricing is like.
Since this is Khan Academy, where we like to enable you to learn skills for free, I'm going to show you an option for hosting your website for free on a place called Github.
Want to join the conversation?
- Who sells domain names? I guess to be more specific who owns a domain before I buy it. Say I want www.[myentiregeneticcode].com--I'm going to assume that hasn't already been purchased--why does it make sense that I would pay money year after year to a domain name registrar to use that domain?(39 votes)
- (Usually) Nobody owns a domain name that does not exist. You dream it up, then register it.
If you pay a registrar, you get what they offer: a registration of your domain name and a list of IP addresses where name resolvers can visit to map xyz.yourentiregeneticcode.com to their appropriate values.
If you don't register your domain name, you run the risk of someone else snapping it up as their own.(45 votes)
- What exactly does http://localhost mean? Does it mean that only people on your server can view that page?(2 votes)
- The short inaccurate answer is "yes". The accurate answer is more involved.
http://localhost is a URL that points at your (local) machine. You could also embed your "local host" IP address in the URL and accomplish the same thing - http://127.0.0.1 .
The point being that anyone can run a web server without doing the work of making it visible to the world. But accessing the web server's pages may only be viable by local access.(18 votes)
- Someone correct me. You can host your site on your own computer but it has to be always turned on. I mean you can't shut down your computer, then.(6 votes)
- The computer hosting the website can be shut down. That means that the site is unavailable or "dark" during shutdown times.(9 votes)
- Can I use my own computer as a server?(7 votes)
- How do you set up a website without spending money? I mean, how did the first website ever go online when buying domains and hosts wasn't a thing?(4 votes)
- Domains and hosts existed before the web. There where already services like smtp (e-mail) and ftp. Also irc, newsgroups and gopher existed. The http protocol was just an addition to the existing services.
Early on you could just reserve ip addresses and a domain name for a small expedition fee. Some early orgaisations could negotiate to handle the root servers for a country domain and so had rights to create all sub domains.
Still you needed to buy servers for dns and hosting, and have some network connection to a backbone provider. Or be an operator. So it have never been free.
I think it have never been as cheap as now when you can just buy a web hosting service with everything included.(8 votes)
- if i put my webpage on github, can i remove that later from github ?(6 votes)
- Yeah, I'm pretty sure you can just delete the repository.
Or, if you don't want to delete the whole repo:
1. Go to the repository's Settings tab
2. Go to the Pages menu (under Code and automation.)
3. You can click the ... button next to the "Visit site" button and click Unpublish site.(1 vote)
- Can I make my own domain, or buy it off a registrar for myself to manage?(3 votes)
- you can go to GoogleDomains if you want to buy a custom domain like .com or .in etc. you will have to pay annually. GoogleSites lets you build your own site but you need to buy a domain name if you want people to be able to find your website. Thanks!(5 votes)
- Where are the dn servers located?(3 votes)
- Servers can be anywhere there is a stable connection to the internet - they're just there to store and serve data. Some large companies like Google have enormous server farms that span the length and width of football fields.(3 votes)
- dear mam and sir,
when i will be able to make games based on the codes i have learned..can we also make games by html and css as our tool....and please mam and sir....please tell me what is github actually as i just searched for it and got quite confused what to do next?(3 votes)
- Is there a website that provides domains for free? For example, could I get mywebsitecoding.com without paying money?(2 votes)
- If you want your website hosted, I'd try first doing it through a free "hoster", such as GitHub or repl.it.(4 votes)