Practical tutorials

How to connect a website to hosting and a domain: a cPanel guide

The site is finished, but it is not visible on the internet until you connect it to hosting and a domain. Here is the whole path, from DNS to the first visit.

🧭 What a domain and hosting are

A domain is the address (for example yourcompany.rs), and hosting is the server where the site's files live. For the address to lead to the server, the domain is pointed through DNS settings. The choice is explained in the articles .rs or .com domain and how to choose hosting.

🔌 Step 1: point the domain at the hosting

There are two usual methods:

  • Nameservers. At your domain registrar you enter the nameservers your hosting provider gave you (for example ns1 and ns2). It is easiest when the domain and hosting stay with the same provider.
  • A record. You keep the nameservers at the registrar and add an A record pointing to the server's IP address, plus a record for www.

The change can take from a few minutes to 24 to 48 hours to propagate.

🗂️ Step 2: add the domain in cPanel

In cPanel open Domains (or "Addon Domains") and add the domain. For the account's main domain the files go in the public_html folder.

Ready for your website to start bringing in clients?

Message us on Viber or WhatsApp and get a free project estimate.

📤 Step 3: upload the files

  1. In cPanel open File Manager and go into public_html.
  2. Upload the ZIP archive with the site (Upload) and choose Extract.
  3. Check that index.html sits directly in public_html, not in a subfolder.
  4. Turn on showing hidden files so you can see .htaccess.

For WordPress, an installer or manual installation is used instead, as described in the article building a WordPress website.

🔒 Step 4: enable SSL

In cPanel enable AutoSSL or "Let's Encrypt" for the domain and check that the site opens on https://. Then redirect http to https. The article SSL certificate and HTTPS has the details.

✅ Step 5: check

  • The site opens with and without www and redirects to one version.
  • All links, images and forms work.
  • There are no insecure content warnings.
  • Submit the sitemap to Search Console and check speed on PageSpeed.

Ready for your website to start bringing in clients?

Message us on Viber or WhatsApp and get a free project estimate.

🆘 If the site does not work

The most common causes are DNS still propagating, the wrong folder, files in a subfolder or SSL not set up. If you want us to take over the whole procedure, see hosting and domain or website maintenance.

questions & answers

Frequently asked questions

How long does it take to connect a domain?

Usually a few hours, and in rare cases up to 48 hours.

Must I buy the domain and hosting in the same place?

No. They can be with different providers, with correct DNS settings.

Where do I put the site files?

In public_html for the main domain. Additional domains have their own folders.