
How to Put a Website Online in 2026: Domain, DNS, Hosting, and Deployment Explained
If your site works on your laptop but not on the internet, you are missing four pieces: a domain, DNS records, hosting, and a deployment method. Once those click, putting a website online stops feeling mysterious.
Here is the plain-English version:
- Domain: your address, like
example.com - DNS: the phone book that points that address to the right server
- Hosting: the computer that stores your site and serves it to visitors
- Deployment: the act of uploading or publishing your site to that hosting
For most beginners, the easiest path is this:
- Buy a domain from a registrar
- Buy hosting from a beginner-friendly host
- Point the domain at the host with DNS
- Upload your site files, or install WordPress
- Turn on SSL and test redirects
That is the whole job. The details matter, but the overall flow is not more complicated than that.
Step 1: Buy a domain name
A domain registrar is the company where you buy yourname.com. You pay yearly to keep it.
Pick a domain that is short, easy to spell, and easy to say out loud. If you have to explain the spelling every time, it is a bad domain. For most projects, .com is still the default choice because people trust it and remember it.
Keep your domain registration and hosting mentally separate, even if you buy them from the same company. That makes troubleshooting easier because you can ask: is the problem with the domain, the DNS, the hosting, or the site itself?
Step 2: Choose the right kind of hosting
Hosting is where beginners often get stuck because the market is full of plans with vague labels. Ignore the marketing and choose based on what you built.
If you have a simple HTML/CSS/JS site
You need static hosting or basic web hosting. Your site is just files like:
index.html
styles.css
script.js
images/
This is the cheapest and simplest kind of site to publish. There is no database, no server-side code, and fewer things to break.
If you built a WordPress site
You need PHP and MySQL or MariaDB support. In practice, that means shared WordPress hosting, managed WordPress hosting, or a VPS.
If this is your first launch, do not start with a VPS unless you specifically want to learn server administration. A VPS gives you control, but it also gives you responsibility for security updates, web server setup, backups, and debugging.
My default recommendation for beginners
If you want the easiest start, choose beginner-oriented shared hosting for a first site. Hostinger and SiteGround are both common picks because they reduce the amount of server setup you have to do.
If you are launching a business-critical WordPress site and care more about support and performance than about paying the lowest price, managed options make more sense. That is where services like WP Engine fit, though they cost more and are overkill for a personal portfolio.
Step 3: Point your domain to your host with DNS
This is the part that feels technical, but the concept is simple: your domain needs records that tell browsers where your site lives.
The two DNS records beginners deal with most are:
- A record: points a domain to an IPv4 address, such as
93.184.216.34 - CNAME record: points one name to another name, such as
wwwtoexample.com
A common setup looks like this:
Type Name Value
A @ 203.0.113.10
CNAME www example.com
That means:
example.comgoes to your server IPwww.example.comfollowsexample.com
Your hosting company usually gives you one of these:
- a server IP address
- custom nameservers like
ns1.host.comandns2.host.com - a target hostname for a CNAME
Then you update your domain settings at the registrar.
Nameservers vs DNS records
This confuses almost everyone at first.
If your host tells you to change nameservers, you are handing DNS control to the hosting company. After that, you usually manage DNS inside the hosting dashboard.
If your host tells you to add A records or CNAME records, you keep DNS where it is and only add the needed entries.
Neither approach is automatically better. For beginners, using the host's nameservers is often easier because the host's support docs match the dashboard you are using.
DNS propagation: the annoying but normal delay
DNS changes are not always instant. Sometimes they work in 5 minutes. Sometimes they take a few hours. A full 24 to 48 hours is still possible, though often shorter now.
If your site does not appear right away, do not panic and randomly change settings three more times. That is how people create new problems while waiting for the old change to finish.
Step 4: Deploy the website files
Once the domain points to the right host, you need to put the site on the server.
How you do that depends on what kind of site you have.
Deploying a static site
For a basic site, you usually upload files into a web root folder such as:
public_html/
www/
htdocs/
Your homepage should usually be named index.html. If you upload home.html but the server expects index.html, visiting the domain may show a directory listing, a default host page, or an error.
You can upload files in a few ways:
- the host's file manager in the browser
- FTP or SFTP with a client like FileZilla
- Git-based deploy tools, on hosts that support them
For beginners, SFTP is the safer default than plain FTP because it encrypts the connection.
Deploying a WordPress site
If you are starting fresh, most shared hosts offer one-click WordPress install. That is fine. Use it.
If you built the WordPress site locally and want to move it online, remember that WordPress is not just files. It also uses a database. A complete migration usually includes:
- Uploading the WordPress files
- Creating a database on the host
- Importing the local database dump
- Updating
wp-config.phpwith the live database credentials - Replacing local URLs with the live domain
That last step matters because local URLs like http://localhost:10005 will break images, links, and scripts on the live site.
Step 5: Turn on SSL so your site loads over HTTPS
In 2026, a site without HTTPS looks broken and untrustworthy. Browsers may warn users away, and many integrations assume SSL exists.
Most hosts now provide free SSL certificates, often with one-click activation. Once enabled, make sure both of these work:
https://example.comhttps://www.example.com
Then make sure the non-HTTPS versions redirect to HTTPS.
A good final state is:
http://example.comredirects tohttps://example.comhttp://www.example.comredirects tohttps://example.comorhttps://www.example.com- only one canonical version remains
Pick either www or non-www and stick to it. There is no universal winner. I usually prefer non-www for small sites because it is cleaner.
Common launch mistakes that waste the most time
These are the problems I see most often.
Pointing the domain to the wrong place
A typo in an IP address or nameserver is enough to take the whole site offline. Copy and paste values exactly.
Uploading files into the wrong folder
If your files are in /public_html/site/ but the domain is looking in /public_html/, the site will not load as expected.
Missing the index file
If there is no index.html or index.php, the server may not know what to show first.
Forgetting the database for WordPress
Uploading WordPress files without importing the database gives you an incomplete site.
Mixed content after SSL
This happens when your page loads over HTTPS but some images, scripts, or CSS files still use http:// URLs. Browsers may block them. The result is a half-broken page with missing styling or functionality.
Not setting redirects
If both www and non-www versions load separately, search engines can see duplicate versions of the same site. Pick one version and redirect the other.
Testing only the homepage
The homepage can work while internal pages, images, forms, or CSS fail. Always click around.
A simple launch checklist
Before you tell anyone your site is live, check these items:
- Domain resolves to the correct host
- Homepage loads
- Internal pages load
- Images, CSS, and JavaScript load
- HTTPS works
wwwand non-wwwbehave the way you want- Contact forms send successfully
- WordPress admin login works, if applicable
- Broken links are fixed
- Default placeholder pages are removed
If possible, test from both your phone and your laptop, and from a private browser window. That helps catch cached results and mobile-only layout issues.
The shortest path for most beginners
If you want the least painful route, use this decision tree:
- Portfolio or brochure site with plain files? Buy hosting, point the domain, upload
index.html, enable SSL. - WordPress blog or small business site? Use shared or managed WordPress hosting, install WordPress, map the domain, force HTTPS.
- Want to learn servers deeply? Use a VPS later, not for your first launch.
That is the real answer to how to put a website online: you are connecting a domain to a server, then putting your files or app on that server correctly. Once you stop treating domain, DNS, hosting, and deployment as one blurry step, the whole process becomes much easier to debug.