Now let's start at the basics.
How can we publish our website to the world?
Well, for this, your website must be hosted
on some remote machine as it's called.
Now, what does that mean?
It simply means that we have our website code
and our website code lives on our local machine right now,
which typically doesn't accept external HTTP requests.
And we don't want our local machine
to accept external HTTP requests
as this would pose a security issue.
Instead, we wanna keep our code on our local machine
and work on it and test it
as long as we are, well, developing the website.
But of course, at some point,
we wanna expose our website to the world.
Because we wanna enable visitors,
people from all over the world to view our website
and they can't access our website code
as long as it's on our local machine.
This is not possible because as mentioned,
our local machine typically does not allow
external HTTP requests.
Now I will say you could configure your local computer
and network such that it does allow external requests
because in the end, the remote machines
we're going to move our code to later
are just regular machines that are configured such.
But unless you really know what you're doing,
you don't wanna fiddle with your local computer
or network configuration to allow external visitors
because as mentioned before as well,
this can quickly introduce security problems.
So therefore, instead, the goal is to deploy,
which basically just means to upload our website code
onto some remote machine that is configured
to take external HTTP requests.
So we wanna have our deployed website code
on such a remote machine.
And that remote machine
and therefore the code on that machine
will then be accessible by external visitors
and therefore people from all over the world
will be able to see our website.
Now, this remote machine is typically not configured by us
because it's not an easy task.
You could do it
if you are an experienced network administrator.
You could definitely build your own computer,
configure it correctly,
connect it to a network and configure that as well,
and then build your own computer
that is exposed to the world.
But typically, we don't do that
because it's definitely not easy,
but instead easy to mess up.
Because if we would wanna do that on our own,
we, of course, would have to take care
about having proper hardware,
about installing all the software
and configuring all the software
that might be needed behind the scenes.
We would have to deal with the network configuration
and with exposing the proper ports on our machine
so that external requests can reach those ports.
And, of course, we would have to deal with security issues.
So definitely nothing we wanna do on our own typically.
And instead, there are dedicated hosting providers,
companies out there which sell hosting,
so the offering of such pre-configured machines
as a service.
And therefore, we can just pay those providers
to get access to a readily configured machine
onto which we can upload our code.
And thankfully, there are even providers
that let us get started for free
and we'll have a look at such an example provider
throughout this course section.
Though I will say already,
if you Google for a hosting provider
or something like host a website,
you will find dozens and hundreds of results,
advertisements and regular results
of hosting providers you could use
and of blog articles and comparisons
that walk you through different hosting providers.
And, of course, it's way beyond the scope of this course
to compare all those hosting providers.
There basically is an infinite amount of those providers.
But instead it's up to you,
if you're serious about deploying a website
to go through a couple of different options
and find out which option you prefer.
Of course, all those hosting providers
typically allow you to host a website,
but then some providers have some extra services.
Some providers give you more control,
whereas others gives you less control and so on.
You can, of course, always switch a hosting provider
even after you chose one if you wanna migrate your website
to a different provider in the future.
But for the moment, that's it about hosting providers.
We will later use one together in this course section,
but before we do that,
we'll have to prepare our website a little bit
and we'll have to learn a bit more
about choosing a proper hosting provider
because it turns out that there is one important difference
you should be aware of.