DEV Community

Andrew Capp
Andrew Capp

Posted on • Updated on

Tips for 3rd Party Website Hosting

As a web developer, one of your most valuable marketing tools may be a personal portfolio website where you can showcase your projects, blogs, and more. The good news is there are many options for hosting your website as well as tools to make the process easier. The bad news is that it can be time consuming and difficult to narrow down the choices and figure out which tools you need to get your website up and running. After setting up hosting for my own portfolio website, I have a few tips that might make the process easier for you. My website is at http://andrewcapp.com if you would like to check it out.

Find a Hosting Service Provider

There are many options for hosting your website at a wide range of price points. I researched several well-known providers ranging from free to expensive. I decided on a low cost provider with a positive social image (GreenGeeks.com) which has great service and support. There are several websites that can help you compare various providers and I recommend looking at a couple to see if you get similar answers in more than one place.

Some of the well-known providers have great service and lots of options, but be careful of extra fees and required add-ons that can really increase your cost. If cost is an issue there are several free providers, but be aware that you will sacrifice something – either having to use their domain, not having many tools (like Cpanel), or not having the option to host more complex code.

Setting Up Your Domain

This is easiest to complete once you select your hosting provider. If you already have a domain registered on another site the transfer process is fairly simple, but does require time and effort on both ends. If you don’t have a domain, then work with your selected provider to get one set up – a pretty easy process.

I had to transfer my domain which required getting authorization codes, contacting support at my new hosting site, and waiting about a week for the transfer to complete. When my site was ready to go live I couldn’t get it to work and found that the domain nameservers needed to be manually changed to the new hosting site’s servers. I somehow missed this when reviewing my setup, but the support staff at GreenGeeks found the issue quickly once I asked for help.

Readying Your Code

Many hosting sites have templates you can use to set up a basic website. These are a great option if you don’t want to manually create your site. As a web developer, I relished the opportunity to create my own website from scratch so I did not utilize any templates and instead had a great time building my site from the ground up.

What I didn’t know was how to get my JavaScript and React framework code set up in a way that works on GreenGeeks. Fortunately, a simple search found a great blog post by Amit Rai titled How To Deploy React App on Shared Hosting (Cpanel): https://medium.com/@aforamitrai/how-to-deploy-react-app-on-shared-hosting-cpanel-d682b0342424. This was a great help and I recommend utilizing this blog if you are uploading your own code to a hosting provider that has Cpanel.

The nice thing is there is a simple command to get your code ready to upload:

Simply type “npm run build” in your project directory and the needed files will be saved in a build folder and ready to go!

Uploading to the Hosting Site

Once you have your files ready you will need an FTP application in order to transfer your files to the hosting site. I followed the instructions on the GreenGeeks site which were well written. I wasn’t able to connect to the FTP server until I fixed the aforementioned nameserver issues on my domain. However, once that was fixed the instructions worked great. There are also helpful instructions in Amit’s blog.

One difference for me is I loaded the FTP files directly into the public_html directory on my host site. There is probably a better way to do this, but I couldn’t get the instructions in Amit’s blog to work for me.

Many providers have great support so if you are having problems getting your website to work don’t hesitate to reach out to them. They certainly helped me more than once.

Making Updates

Congratulations on getting your website up and running! If you are like me, you will have regular updates and will keep tweaking your website design. Updating changes to your live site is simply a case of repeating the steps above to ready your files and upload to the host site.

There are options to use Git Version Control and other tools to automate updating your site. I will look into these in the near future and will let you know if I find some great automation for this. Thank you for reading my blog and I hope you find this useful.

Top comments (1)

Collapse
 
yellow1912 profile image
yellow1912

If you are a developer, teach yourself some linux, go and configure your own server, install your own system. I was in your shoes years ago with cpanel.

Nowadays hosting are so cheap, there is no reason to be on shared hosting anymore. Cpanel limits your ability to optimize your system for your exact use.