Explore WaseerHost

Appearance

BlogWeb Hosting 11 min read

How to host a website: a step-by-step guide for beginners

How to host a website from scratch. Register a domain, pick shared, WordPress or VPS hosting, upload your site, point DNS, turn on SSL and run a pre-launch checklist.

How to host a website: a step-by-step guide for beginners

Summarize with:

Share:

To host a website, you register a domain name, rent space on a web server, put your site on that server and point the domain at it. This guide shows how to host a website from scratch in six steps. It also explains when shared, WordPress or VPS hosting is the right pick, and ends with a checklist to run before you tell anyone the address.

Key takeaways

  • You need a domain name, a hosting account and the site itself, which is WordPress or your own files.
  • Shared hosting suits most first websites. Pick WordPress hosting if the site runs on WordPress, and a VPS only when you need software or resources a shared account cannot give you.
  • Your domain reaches your hosting through DNS, either by changing nameservers or by adding an A record. Registrars can take up to 24 hours to apply a nameserver change.
  • Turn on SSL after DNS points at the server, then force HTTPS.
  • Run the pre-launch checklist before you share the address.

What you need to host a website

A website is a set of files, and sometimes a database, stored on a computer called a web server. When someone types your address, their browser asks that server for the page.

You could run a web server at home, but a hosting company does it better. MDN's guide to web servers lists the reasons. A hosted server is up and connected to the internet all the time, it can keep the same IP address, and a third party maintains it.

How to host a website in six steps

The rest of this guide follows this order.

  1. Register a domain name.
  2. Choose a hosting type and plan.
  3. Install WordPress or upload your files.
  4. Point the domain at the hosting with DNS.
  5. Turn on SSL.
  6. Run the pre-launch checklist and go live.

Step 1: register a domain name

You register a domain through a registrar and renew it every year or every few years. You do not have to buy the domain and the hosting from the same company.

  1. Search for the name you want. If it is taken, try a different ending or a short variation. You can check names on the WaseerHost domains page.
  2. Register it with your real name, email address and postal address.
  3. Open the verification email from the registrar and click the link.

Do not skip step 3. ICANN's rules require registrars to validate and verify contact details, and ICANN states that registrars must suspend or delete domain names that are not verified in time. A suspended domain takes your website and email offline.

Step 2: choose shared, WordPress or VPS hosting

The three hosting types differ in how much of the server is yours and how much of the work is yours.

Hosting typeWhat you getPick it whenLook elsewhere when
Shared hostingAn account on a server that also hosts other customers. The host runs the server and you manage your site through a control panel such as cPanel.This is your first site, a business brochure site, a blog or a small store.You need to install your own server software or run background programs.
WordPress hostingA hosting account set up for WordPress, usually with an installer and WordPress tools in the control panel.You already know the site will run on WordPress.The site is plain HTML or uses a different application.
VPS hostingA virtual server with its own share of CPU, memory and disk, plus root access. You install and update the software, or pay for someone to manage it.You need custom software, long-running processes, or more resources than a shared account allows.You have never managed a server and the site would run on shared hosting.

Start on shared or WordPress hosting if you are unsure. You can move to a VPS later, when you hit a limit such as memory or a program your shared account cannot run.

Before you pay, check five things on the plan page.

  • A free SSL certificate comes with the plan.
  • The plan has a control panel with public documentation, such as cPanel.
  • The server location is close to most of your visitors.
  • You know the renewal price, which can differ from the first-term price.
  • A refund period lets you back out.

Every WaseerHost plan uses cPanel and includes free SSL certificates, with a 30-day money-back guarantee. Plans renew at the same price as the term you chose. You can see current plans for shared hosting, WordPress hosting and VPS hosting, and the data centers page lists the server locations in the USA, Germany and Finland.

Step 3: put your site on the server

Your host emails you a control panel login after you order. What you do next depends on the kind of site.

Option A: install WordPress

WordPress.org recommends PHP 8.3 or greater, MariaDB 10.11 or MySQL 8.0 or greater, and HTTPS support. Check that the plan you chose offers those versions.

Most hosts give you an installer, so you fill in a site name and an admin login and the installer does the rest. On cPanel hosts that enable it, WP Toolkit is the interface for managing WordPress installations.

If your host has no installer, the manual install from WordPress.org has five steps.

  1. Download and unzip the WordPress package.
  2. Create a database and a database user with all privileges. In cPanel, the MySQL Database Wizard walks you through it.
  3. Optionally rename wp-config-sample.php to wp-config.php and add the database details. If you skip this, the installer creates the file for you.
  4. Upload the contents of the unzipped folder to the root directory of your site.
  5. Open your domain in a browser and complete the install screen.

Option B: upload an HTML site

If you built the site yourself, you upload the files to the document root. On cPanel that folder is /home/user/public_html, where user is your cPanel username.

  1. On your computer, compress the site folder into a zip file. The cPanel File Manager cannot upload a folder, only files.
  2. In cPanel, open File Manager and go to public_html.
  3. Click Upload and select the zip file.
  4. Select the uploaded zip and click Extract.
  5. Move the extracted files so that your home page sits directly inside public_html, not inside a subfolder.

Name the home page index.html. When a visitor requests a folder, the web server looks for an index file, and Apache's default is index.html.

You can also upload with an SFTP or FTP client. MDN's upload guide lists common clients. Your host gives you the server name, username, password and port.

Step 4: point your domain at your hosting with DNS

If you bought the domain and the hosting together, the host usually connects them for you and you can skip to step 5. If they are with different companies, connect them in one of two ways.

Change the nameservers

Nameservers tell the internet which company holds the DNS records for your domain. Your host sends you two or more nameserver names.

  1. Log in to the registrar where you bought the domain.
  2. Open the domain's nameserver settings.
  3. Replace the existing nameservers with the ones from your host and save.

Add an A record

If you want to keep DNS where it is, for example because email already works there, change one record instead. An A record maps a domain name to an IPv4 address.

  1. Copy the server IP address from your hosting welcome email or control panel.
  2. Open the DNS settings at your current DNS provider.
  3. Edit the A record for the root of the domain so it holds that IP address.
  4. Do the same for www, or point www at the root domain with a CNAME record.

In the cPanel Zone Editor, you click Manage next to the domain, then Add Record, enter the name and the address, and click Save Record.

Check that the change worked

Cloudflare's setup guide says to wait up to 24 hours while a registrar updates nameservers. Record changes depend on the record's TTL, which sets how long resolvers cache the old value.

To see which nameservers the domain uses now, run this on macOS or Linux.

bash
dig ns example.com @1.1.1.1

On Windows, run this.

powershell
nslookup -type=ns example.com 1.1.1.1

If you prefer a browser, the WaseerHost DNS lookup tool shows the same records.

Step 5: turn on SSL

An SSL certificate lets browsers load your site over HTTPS without a "Not secure" warning. Let's Encrypt, for example, does not charge for its certificates, and many hosts install a free certificate for you.

On cPanel servers the feature is called AutoSSL, and it installs domain-validated certificates automatically. Domain validation means the certificate authority checks that the domain leads to that server, so finish step 4 first.

  1. In cPanel, open SSL/TLS Status and confirm your domain shows an active certificate.
  2. Open Domains and set the Force HTTPS Redirect toggle to On for the domain.
  3. Load http://example.com with your own domain and confirm the browser lands on the https:// address.

Step 6: run the pre-launch checklist

Work through this list before you announce the site. Keep a copy of the backup off the server.

CheckHow to do it
The domain opens the new siteLoad the domain in a private browser window and on mobile data, which avoids your own cache.
HTTPS worksThe padlock shows, and the http:// address redirects to https://.
Both www and the bare domain workLoad each one. One should redirect to the other.
Forms deliverSend yourself a message through the contact form. The WordPress install guide advises checking that email delivery works on your host.
Search engines are not blockedIn WordPress, open Settings, then Reading, and make sure "Discourage search engines from indexing this site" is not ticked.
Google can index the pagesGoogle needs a page that is not blocked, returns HTTP 200 and has indexable content. Add the site to Search Console and submit a sitemap.
A backup existsIn cPanel, open Backup and download a full account backup.
The domain is safeYour registrant email is verified and auto-renew is on.

If the site does not load

  • The domain shows an old page or a parking page. DNS has not updated yet, or your device cached the old answer. Run the dig or nslookup command from step 4. If the nameservers are still the old ones, check the registrar settings and wait.
  • The browser says "Not secure". The certificate is not installed yet. Check SSL/TLS Status in cPanel and confirm the domain's A record leads to your hosting server.
  • You see a file list or an error instead of your home page. The files are in a subfolder, or no file is named index.html. Move the files into public_html.

Hosting your site with WaseerHost

WaseerHost shared hosting runs on cPanel, so the File Manager, Zone Editor and SSL steps above apply as written. Plans include free SSL certificates and 24/7 support. If you already have a site on another host, the free website migration service moves it for you.

Frequently asked questions

Buy a domain and a shared hosting plan, then upload your HTML, CSS and image files to the document root, which is public_html on cPanel. Name the home page index.html so the server shows it by default. Point the domain at the hosting and turn on SSL, as in steps 4 and 5.

Waqas Ahmed Waseer

Written by

Waqas Ahmed Waseer

Founder & CEO

Founder and CEO of Wasevo LLC, the company that runs WaseerHost. He works on cPanel/WHM servers, WHMCS billing and the Next.js storefront.

Related Articles

Get new guides by email

One short email when we publish something useful. No spam; unsubscribe at any time.

Free SSL · Free migration · 24/7 support

Fast cPanel web hosting

See hosting plans
30-day money-back guarantee

Renews at the same price for the term you choose