LESSON 11.1
How to Publish Your Website
Two paths to getting your site live on the internet
Learn the two options for publishing a website, how DNS connects your domain to your server, and the most common mistake that causes images to break after uploading.
💡 The Concept
What is the purpose of making websites? Why do businesses have websites? The answer is the same for both: to have a published presence on the World Wide Web. Without publishing, everything you learned this semester stays on your computer, invisible to the rest of the world.
Potential employers will want to see your published websites. A portfolio that is actually live on the internet carries far more weight than a folder of files on your desktop.
Knowing how to publish a website is the final step that turns your local files into a live site anyone on the internet can visit. Building a website on your computer is only the first step. Publishing it means moving your files to a server that is connected to the internet 24 hours a day, so that anyone in the world can visit your site at any time.
The good news is that publishing breaks down into just three steps, and there is a lesson for each one.

Step 1: Purchase a Domain Name
Your domain name is the address people type to find your site, like yourname.com. You purchase it from a domain registrar such as Namecheap for around $20 per year. Once you own it, you can point it at any hosting provider you choose. See the Purchasing a Domain Name lesson for a walkthrough.
Step 2: Set Up Website Hosting
Hosting is the service that stores your files on a server and keeps your site available around the clock. Shared hosting starts around $60 per year and works well for most small sites. Managed WordPress hosting costs more but offers better performance and support for WordPress sites. The Website Hosting lesson covers what to look for and which providers to consider.
Step 3: Connect with DNS
Once you have a domain name and a hosting account, you need to connect the two. This is done through DNS (Domain Name System), which acts like a phone book for the internet. When a visitor types your domain into a browser, here is what happens behind the scenes:
- The browser sends a request to the DNS
- DNS looks up which server is associated with your domain name
- The request is routed to your hosting server
- Your server sends back your HTML, CSS, and image files
- The browser assembles and displays your page

The Nameservers and DNS lesson walks through how to update your nameservers so your domain points to your hosting account.
Step 4: Upload Your Files with FTP
Once your domain is connected to your hosting account, the last step is getting your files onto the server. FTP (File Transfer Protocol) is the standard way to do this. You use a free program like FileZilla to connect to your hosting server and drag your website files into the public_html folder. After that, your site is live. See the FTP lesson for a step-by-step walkthrough.
Seem Complicated? Try GitHub Pages
If the domain-hosting-DNS process feels like a lot, there is a simpler option. GitHub Pages lets you publish a website for free without purchasing a domain or setting up hosting. Your site gets a URL like username.github.io/projectname. It is a great way to get your work online quickly, and knowing how to use GitHub is a skill employers look for. See the GitHub Pages lesson to get started.
❓ Frequently Asked Questions
Potential employers will want to see your work live on the internet. A published portfolio shows that you can take a project all the way from code on your computer to a real website anyone can visit.
A domain name is your web address, like yourname.com. Hosting is the service that stores your website files and keeps your site running around the clock. You need both, and they are purchased separately.
Yes. GitHub Pages lets you publish a website for free at a username.github.io address. If you want a custom domain name, you will need to pay for the domain (around $20 per year) and a hosting plan ($60 to $400 per year depending on the type).
The file upload itself takes just a few minutes. However, after you update your DNS settings to point your domain at your hosting server, it can take 24 to 48 hours for the change to fully propagate across the internet.
No, and it is often better not to. Your domain registrar holds your domain name, and you can point it at any hosting provider you choose. Keeping them separate gives you more flexibility if you ever want to switch hosts.
★ Key Takeaways
Publishing a website comes down to three steps: purchasing a domain name, setting up hosting, and connecting the two with DNS. Each of these has its own lesson to walk you through the details. If you want to skip straight to publishing, GitHub Pages is a free option that handles hosting for you.
Google Ads
The costs of this website are partially offset by revenue from Google Ads.Tools of the Trade
HTML/CSS Lessons
-
-
-
1.3. HTML Tag Preview
-
-
-
2.2. The HTML Framework
-
-
2.4. HTML Headings
-
-
-
-
-
-
3.01. Introduction to CSS
-
3.02. How CSS Cascades
-
-
-
-
3.05. CSS Colors
-
3.06. RGBA Colors
-
-
3.08. Font and Text Properties
-
3.09. Classes and IDs
-
-
-
-
-
4.3. HTML Embedded Images
-
-
-
-
-
-
5.1. CSS Borders
-
5.2. CSS Border Radius
-
5.3. CSS Gradients
-
5.4. CSS Box Shadows
-
5.5. CSS Text Shadows
-
7.1. The Display Property
-
-
-
7.4. The Box Model
-
-
-
-
-
-
9.1. Website Tables
-
9.2. HTML Forms
-
-
9.4. Special Form Fields
-
9.5. Embedding Multimedia
-
-
9.7. Keyboard Shortcuts
-
10.1. What Is a Framework?
-
10.2. Font Awesome Icons
-
-
10.4. Bootstrap Grid System
-
-
10.6. Bootstrap Navigation
-
-
11.2. Purchasing a Domain Name
-
11.3. Website Hosting
-
11.4. Nameservers and DNS
-
11.5. FTP
-
11.6. GitHub Pages
