Choosing Server and Domain

21 Dec 2019 5 min See Original (spanish)

In this series of posts, we are going to see how to deploy an application written in .NET natively on a Linux server.

 

1 - The reason for choosing Linux

First of all, it is important to explain why we chose a Linux server. A few years ago, choosing this configuration (Linux + .Net) wouldn’t have been possible. But nowadays, thanks to .Net Core, it is, since one of its goals is to be cross-platform.

 

1.1 - Price difference

As I just explained, the common setup has always been to use Windows for .net applications, and this was one of the reasons why .net was successful in business environments and not in user environments, since to get a Windows server, you have to pay for the license.

We’re talking about a Windows server costing around 12€ per month, while a Linux one can cost 3-4€ per month. As you can see, the difference is huge, and it gets even greater if you want to include SQL Server or more memory.

It's also worth mentioning that we offer Windows hosting, because so far NO provider offers Linux + NetCore on shared hosting. Shared hosting on Linux is cheaper.

DigitalOcean Referral Badge

 

2 - Hosting vs VPS server

The first thing is to be clear about what we want, whether hosting or something else, and for that we have to understand what each option is.

2.1 - Windows Hosting

When we talk about hosting, you should know that it’s going to be shared. This means the page where we contract the hosting will give us some space on its hard drive, on its already-installed web server.

Contracting hosting has several advantages.

1 - The first and most important is that everything is configurable with just a few clicks – and money – 

Do you want a mail server? All right, no problem, 5 euros more per month; want more users, 5 euros more a month, and so on. You could keep adding up endlessly.

This is a big advantage, making everything quick and easy to set up.

2 - Of course, security in most actions is already managed by the hosting server, so in our case, we just have to be careful that our application doesn’t have any web vulnerabilities. But the server itself is secure. Another big plus, probably the most important one.

Of course, it also has several disadvantages

1 - Performance and scalability

If our site becomes successful and needs to grow, it will hit a "limit". For example, it will be impossible to get more than 32GB RAM or 1TB disk space – on a VPS these limits are much higher.

2- Configuration and modification

On shared hosting, you cannot configure configuration files as these affect all users on the shared platform, making this a big downside.

A very common example, in the work world, is if you need to modify the hosts files so your application calls another server, or if you need to install certificates, etc.

Or, for example, if you try to add another domain, you won’t be able to unless you pay extra each month.

2.2 - VPS 

First, we need to understand what VPS means: it stands for Virtual Private Server. When you get a VPS, you are renting an empty virtual machine. Depending on the service, you’ll be offered various installation options.

As you can see in the image, I have hosting with OVH and I’m very satisfied.

vps

In my case, I’ve installed CentOS7.

Of course, just like shared hosting, a VPS has pros and cons, and we’ll look at a few of them here.

The main and obvious disadvantage:

1 - You have to configure everything yourself

This option doesn’t apply if you choose to install something like Joomla or Drupal, but it does if you install any Linux distro. This means that if you want a web server, or ten, you’ll have to set them up yourself, same for mail server, FTP, certificates, etc.

2 - security: the thing you should worry about most is site security. When you contract shared hosting, you can wash your hands of it, but when you have a VPS, you need to consider security yourself.

The advantages include:

1 - 100% configurable

Since you have to configure everything, you can do whatever you want. If you decide to use the latest version of .Net Core as soon as it’s out, you just install it. On shared hosting, you may never have it available. For example, most hosts don’t even have Net Core 2.1 yet, which has been available for over two years.

2 - Price

A VPS’s price is what it is, with no extra costs, obviously if you want more RAM or a bigger processor, it will cost more, but not for new "modules."

These are the prices of OVH, which is the VPS I use:

OHV prices

3 - Final choice

When deciding what to choose, you need to remember there are no better or worse options, just two alternatives that serve different needs.

Personally, for a personal project, I prefer a VPS. I’ve had shared servers all my life, but the configuration limitations make it very frustrating. In fact, I had a Windows one and cancelled it because there was no plan to offer .NetCore, only .Net Framework.

 

DigitalOcean Referral Badge

 

On the other hand, if I made a website for a family member’s business, I’d choose shared hosting so they’d be able to maintain their email, etc. because it’s simpler. Of course, if it’s a huge company with lots of traffic, you should use a VPS, but for a small business a shared server is enough.

In our case, a VPS is the right choice, as it allows us to experiment much more.

4 - Domain name

Finally, all that’s left is to choose the domain name we’ll use. Although at the beginning it’s not strictly necessary, since we can access the VPS via IP, it’s always good to have a domain.

To do this, you can buy it from any domain provider and transfer it later, or just buy it directly from the same place where you got your VPS server.

Don’t forget to include the domain in the DNS zone with the A type pointing to the IP, and the CNAME to the site.

 

This post was translated from Spanish. You can see the original one here.
If there is any problem you can add a comment bellow or contact me in the website's contact form

Uso del bloqueador de anuncios adblock

Hola!

Primero de todo bienvenido a la web de NetMentor donde podrás aprender programación en C# y .NET desde un nivel de principiante hasta más avanzado.


Yo entiendo que utilices un bloqueador de anuncios como AdBlock, Ublock o el propio navegador Brave. Pero te tengo que pedir por favor que desactives el bloqueador para esta web.


Intento personalmente no poner mucha publicidad, la justa para pagar el servidor y por supuesto que no sea intrusiva; Si pese a ello piensas que es intrusiva siempre me puedes escribir por privado o por Twitter a @NetMentorTW.


Si ya lo has desactivado, por favor recarga la página.


Un saludo y muchas gracias por tu colaboración

© copyright 2025 NetMentor | Todos los derechos reservados | RSS Feed

Buy me a coffee Invitame a un café