5

I secured domain on register.ca, and I have it in my account. How would I go about actually uploading my HTML & CSS files onto the website? Previously, I just used GitHub to host my sites, so I'm not very familiar with the whole site hosting thing.

I've tried googling tutorials, but they don't seem to work for me.

Stephen Ostermiller
  • 99,822
  • 18
  • 143
  • 364
lilsolar
  • 63
  • 1
  • 5

5 Answers5

13

Rather that upload your files to your domain, you have to get website hosting and point your domain to it. Here are the steps you need to follow:

  1. Find a web host. See How to find web hosting that meets my requirements?
  2. Find a DNS host. Usually both your domain registrar and your web host offer DNS hosting services included with your domain registration or web hosting package. It is also possible to choose a third party for DNS hosting.
  3. Edit your NS records at your domain registrar to point to the values given to your by your DNS host. If you choose to use your DNS registrar as your DNS host, you shouldn't have to change anything.
  4. Configure your domain at your web host. Every web host is going to have different instructions for doing this step. Some may ask for your domain name when you purchase hosting. Others may have you add a "custom domain" after the fact. Others use the terminology "Add-on domain." The web host will use this information to configure the web server to respond to requests for that domain, usually with files from a specific directory on their server. If you get a dedicated server, virtual private server (VPS), or are hosting at home, you will have to install the web server and configure it yourself.
  5. Edit your DNS records at your DNS host. If you are using DNS hosting from your web host, they will usually do this step for you. Your web host will give you values to put into DNS. You will need an A record for the domain apex (AKA, naked domain name like example.com) pointing to the IP address of your web host's server. You will also need a record for the www. subdomain which can either be an A record or a CNAME record if recommended by your web host.
  6. Upload content to your web host. Every host is going to have different instructions for this step. It is commonly done with FTP, SFTP, or SCP.
  7. Get a security certificate for your site so that HTTPS works. Most web hosts will now handle this for you with the click of a button by obtaining a free certificate from LetsEncrypt.
Stephen Ostermiller
  • 99,822
  • 18
  • 143
  • 364
12

Since you've mentioned using GitHub Pages to host your site in the past, here's an answer that allows you to add the domain you've bought directly to your GitHub Pages deployment.

  1. Navigate to the settings tab of the repository. Settings tab
  2. Navigate to Pages > Custom domain and fill it out with your domain name. Save your changes. Saving custom domain
  3. Finally, visit your registrar and add a CNAME DNS Record to alias your domain to your GitHub site. You may need to delete existing records. Adding a DNS Record

More information available in the GitHub docs

I.Am.A.Guy
  • 236
  • 1
  • 5
3

The answers regarding using a webhosting to connect the domain are correct and are the usual way to go, although, you can use different solutions to save money, time and change to a learning area that you might already be involved in :

  1. To save money, you can use your own computer at home and connect the domain to, as long as that computer is running and connected to the internet it will serve your html and css or whatever site, you will have to install something such as LAMP stack, (Linux, Apache2, MySQL, PHPmyAdmin), can be a simple process.

  2. You can borrow from a friend or receive free support from non-profit organizations, that can connect your domain to their hosting, they can give you an FTP account that you access using FileZilla or sFTP, they can also provide you with database access, security, and upload your files, it's safe, as long as you trust the provider.

  3. If you won't be using anything other than HTML and CSS, You can link your domain name server to free cloud providers such as Google Drive. Every time the domain is opened it will be lead through by an XML or HTML index that handles the rerouting process, it's interesting to learn that.

In case you're wondering what is FTP, you can think of it, as your file manager at your desktop, not so different in the sense. Check the image below, this is an ftp program that opens the files of a website, the website is on the right :

Ushby Organization FTP support

2

A domain name just gives you control over the DNS records that computers use to map a hostname to an IP address. (Connections over the Internet are always from IP address to IP address, not by name alone.) The servers that answer DNS queries won't also host your web site; that's a separate thing.

See other answers for details. An analogy may help understanding them:

  • DNS is like a phone book, mapping names to numbers.
  • A phone number is like an IP address
  • An answering machine is like a server; if configured to take calls, it will. But it's only reachable if connected to a land-line with a permanent phone number, and people know how to reach it by looking up a convenient name in the phone book to find that phone number.
  • A web-hosting service is like an answering service, with answering machines connected to phone lines ready to answer calls. You can pay them to take calls for your site by name, or even with a dedicated phone number (IP address) that isn't shared with any other site.

With just a domain registered, you're paying for an entry in the phone book that maps your name to a phone number. That's all you have so far, no phone number to point it at, and no answering machine that answers calls.

So you have nothing useful to list in your phone-book entry.

This is a fairly decent analogy. Virtual hosting doesn't need every "server" to have a separate IP address; it can sort out who the caller wants to contact by name after they call a shared phone number. (via HTTP headers in the request).


You could list your home phone number, i.e. home desktop computer, if your ISP happens to give you a stable IP address and allows hosting servers. But then you'd have to be responsible for being the admin of your own web server, keeping up with security updates. (In the analogy, using your home answering machine for this, making it the target of crank calls and spam, and people who fill up the tape, or try to break it.)

Many ISPs don't give you a stable IP address with port 80 (http) or 443 (https) open, or have rules against actually hosting a web server. But even if you technically could, with your level of experience you wouldn't want to. I mention this only for completeness of the analogy, and to maybe help understand what it is that a web-hoster is actually doing.

Peter Cordes
  • 121
  • 3
-1

For this you need hosting as a minimum After you buy a domain you have to bind it to the hosting by means of dns records Then choose whether you will install a cms on hosting or just host the files of a one-page site P.S. If you are not an expert in site building you can ask for help at your hosting to place files on your hosting and explain how to bind your domain to hosting

rifex
  • 77
  • 1