August 24, 2020

Breaking free from old constrains

How to move from traditional hosting to a free modern solution - Netlify is a service that allows the deployment and hosting of static websites. Learn how to use Netlify, build your website in a breeze, and render your ancient (fee-based) hosting obsolete.

Netlify is a service similar to Github Pages that lets you automatically publish your GIT Repository to the web. Setting up the service is pretty straightforward. You allow Netlify to access your Repository, indicate the branch, and the build command/path you want to publish. The service then starts to build your GIT-Branch and serve the static files under a specific Netlify domain.

My website is built with angular and publicly available on Github. The project is linked with Netlify with the following build settings:

netlify build settings

These build settings indicate that a new build will run the node command ng build --prod. Once that build process is finished, it will publish the content of the folder dist/portfolio to the web. With every commit to the branch (master), a new build will be started.

Setting up your domain

Assuming you are moving from another hosting to Netlify, the best way to migrate your current domain is by replacing your name servers. If you only want a subdomain, you can simply point an A-Entry in your domain to Netlify. An in-depth explanation of how to achieve this can be found in the documentation. Updating your DNS name servers may take a while. Netlify will automatically detect your new configuration and set up SSL certificates with Let's encrypt so that your domains run under HTTPS.

Redirecting your mailbox

Because I stopped my hosting, including my old mailboxes, I needed to find an alternative, which was preferably free. This is where improvmx.com comes into play. This service redirects incoming mail to a specific mail address. All you need to do is set your dns mail exchanger record to improvmx.com:

improv mx mail

Setting up a wildcard for a domain helps you to capture all incoming mail, besides you can track who is selling your user data to third parties by using different email addresses per subscription.

Result

I now save 10$/month, I no longer need to deploy new files via SFTP or worry about backups/data loss. Instead, my files are available on Github, assets are highly available via CDN and optimized by Netlify, my SSL certificates are auto-generated, I have unlimited mailboxes and my website is prerendered for search engine optimization.

Made with ♥️ and  Benjamin Mathieu, 2020