Naps starting in the web world As a programmer, one of the first questions that arises for sure is:How can I upload a website to the internet and make it public?
To help you, and many others who have already asked me about this, I have written this simple and to the point article.
KISS method, always.
I am sure that after reading this tutorial you will have your website online in 10 minutes!
- Acquire a domain for your website
- Hire a hosting service or web server
- Enter your DOMAIN in the hosting
- Link the domain with the Hosting
- Upload your web files to the server
- Access your new website
Acquire a domain for your website
The first step for any website that wants to be visible on the internet is to have an assigned domain.
The domain is the first part of every url of a website, it is the address or name that it receives and by which the DNS Servers know where the website is hosted. These servers are where the real IP of the site is asked. In this way, when you access web pages such as www.srcodigofuente.com these servers answer your browser with the IP XXX.XXX.XXX.XXX.
To acquire a domain you must go to domain providers. There are many of them and as it also happens with hosting providers, it is better to do it in a trusted site that offers good service and assistance.
Trusted domain providers I can recommend:
- GoDaddy: It is an international provider and an important company with many years in the sector.
- MrDomain: provider with a large number of offers and that resells its services to many internet hosting providers.
- IONOS (formerly 1and1): This is really a hosting provider but given the quality of their support etc. It is a good place to buy your domain.
In addition to the sites that I mention, which are specialized in the sale of domains, you can purchase your domains on almost any web host self-respecting, however, I recommend that buy your domains from a quality domain providerand always in the same one, so that you have centralized your access to the domains.
The average price of domains is usually around €10/year and will depend on specific offers and their extension: .com, .es., .info, .edu…
Hire a hosting service or web server
After having your contracted domain, what you should do is hire a hosting servicewhich means that you should look for a online server provider
As it will surely be your first project, if you hire the cheaper hosting will suffice.
The cheapest hosting are usually around €2-3 per month and have the necessary resources to set up websites with up to 300 or 400 daily visits without problems (although it will depend on the code or CMS you use for your website).
Hosting providers there are hundreds and even thousands, many of dubious quality and even some run by practically amateurs.
Even if you are just starting out, I recommend you follow good guidelines to choose a good hosting provider, that is, a company that has at least good telephone service and email service.
There are many hosting providers, although I recommend the following, which have good technical assistance and resolution of possible crashes or problems:
- 1and1 which is now called IONOS (Spain, Europe and almost any country worldwide)
- Siteground (Multiple countries including Spain)
- Hostinet (Spain)
- Sered (Spain)
- Hostgator (United States mainly)
These are just some of the hosting providers that I leave you as a reference, which I myself have tried with good results.
If you wonder why I indicate the country next to the provider, it is because its location is really important with respect to the public to which the web is directed, although it is true that with more knowledge you could solve it.
Enter your DOMAIN in the hosting
When you are in the process of contracting your accommodation, the provider will ask you for which domain you want to configure the server, remember to indicate here your contracted domain if you have done it separately, in this way, when you carry out the next configuration step, you will not have problems getting it to work.
Link the domain with the Hosting
Once points 1 and 2 have been completed, if you have not contracted the domain and hosting together, you must do what I will explain below. You are very close to being able to make your website visible!
To continue with the process, you must access the configuration panel of your web hosting, and once there, look for the server DNS addresses. There are always 2 and they are usually sent to you by email when you hire the hosting service.
If this is not the case, and you cannot find where they are written, you can ask the providers to give them to you.
Once you have entered the 2 DNS addresses, you will only have to go to your domain provider, access its configuration, and where it indicates the server’s DNS addresses, write DNS 1 and 2 as indicated.
You save the configuration, and you will have to wait approximately 24 hours for your domain to allow your website to be viewed.
Upload your web files to the server
With your domain pointing to the server, and having waited the approximately 24 hours it takes for your website to become visible, you only have the final step left: upload your website files to the server.
To upload the files to your server you will need an FTP account.
This type of account with its username and password allows you to remotely access the web server storage, and manipulate the files that are there or upload new ones.
All hosting providers will have, in their hosting configuration panel, a section that will say: FTP accounts.
So create one there, copy your login details (Username, password, ftp protocol, ftp ip/url) and get ready to configure the FTP login program.
Among the FTP programs that exist, I recommend 2 that work like a charm:
- Filezilla (MAC or Windows)
- WinSCP (Windows)
Once one of these programs is installed, you must set up an account with the 4 data listed above:
- The ftp protocol used: FTP or SFTP
- The IP or URL of the server for FTP access.
- The username.
Connect with this new account set up and browse to the folder for the web page. Depending on the contracted server, 2 things can happen:
- That you directly access the destination folder of the web hosting.
- That you access the root folder of your accommodation, where you will see several folders such as logs, email, etc. If this is your case, look for one of the following folders: httpdocs or public_html.
Now you only need to upload your web files to this directory, in which you have to make sure that there is at least one index.php either index.html.
Access your new website
That’s it! If 24 hours have passed since you contracted the domain and redirected it to the servereither did you contract the server and domain togetheryou will now be able to access your domain and see the page built with the files you have uploaded.
I hope this tutorial has been of great help to you, I have tried to tell you everything in the simplest way possible. I have not dealt with aspects such as the database in order to be as direct as possible and not confuse anyone.
I would appreciate it if you would leave a comment or share the publication if it has been helpful to you, thus helping me to continue creating content and other users to learn in the same way as you.