Step-By-Step Guide to Building Your First Website & Hosting It Online
Table Of Content
- Step-By-Step Guide to Building Your First Website & Hosting It Online
- So, first thing, why would you even want to create a website?
- Step One: How can you host a website online?
- Step Two: Create a custom domain
- Step Four: Make sure to add Google Analytics to your website
- To sum it up
- Read Next
Step-By-Step Guide to Building Your First Website & Hosting It Online
Are you a web developer?
Do you know how to create and host a website online?
Have you ever thought about creating a website? If the answer is yes, then you are at the right place.
This article will give you tips on building your first website and hosting it online.
Let's dive in.
Must Have Best VSCode Extensions To Increase Your Productivity
So, first thing, why would you even want to create a website?
Suppose you want to create your portfolio and pull it out for the entire world to see what you're making. In that case, you can upload your resume on a website, and you can showcase your projects, you can build a website for someone, you can even start your freelancing career by building websites for companies and other indie hackers.
Step One: How can you host a website online?
So the number one thing you need when you want to host something, hosting a website online is what we call a host. We want an online server that will contain all your files or your code so that browsers can be served through those hosting servers, essentially.
You can host your website on GitHub or Netlify.
All you need to do is create a repository on GitHub. Create a branch on GitHub called G H pages, put all your code on that branch, and follow the instructions.
After you create your branch called a G H page, those are the called Kita pages. You want to push your code to your repository, to the GH pages branch, and that's it.
So your website is now online, essentially. So if you have your index page in the root folder of your repository on that brand, you and that index page, meaning index HTML, which has all the contained of your website. It could just have a div, and it could just say hello, world.
That could be your website for now, too, just to get started and testing. After you've pushed that index file to the GitHub repository, all you need to do is go to github.io and put your username at the start of your website.
So it can be your username dot GitHub dot. And that should take you to whatever you have pushed in that index. HTML. Once you have the index.HTML you have built on top of it, you can simply add other pages like the about me homepage, contact me, testimonials, anything your projects, anything you want, you can.
Upload your media on GitHub. I would suggest using a CDN-like content delivery network, essentially, where you can upload your videos and images and then serve those media files through a CDN server instead of hosting it yourself. That has many benefits using CDN.
Netlify is one of my favorite tools. You can create an account for yourself, and there is an option to drop your website files. If you create an index relay stream and drop that integral HTML on Netlify in that toolbox, it will host it.
It will also give you an online URL. So basically, you can share that URL with your friends and family, and they can see what you've written on that index HTML, and that's it. Once you have your index, you need to build on top of that.
Step Two: Create a custom domain
Whatever your website's goal is, you can modify that template and drop it on the Netlify dropping tool. Your website is online now, but you want to use a custom domain name. So custom domain name is something you put in the URL of a browser.
So like my custom domain name is sleeplessyogi.com, if you go to that site, you will be taken to my own website where I host my blog and my podcast and just my courses and things like that. Basically, it contains all my info. So you can give your website the custom domain because by default, when you follow the steps I mentioned earlier, you will be given the default domain name, that given hosting site, basically, whatever it provides you. Still, you can add your own custom domain name to that.
To create a custom domain name. Basically, you need to purchase it from a registrar.
Go to godaddy.com and search for any custom domain name that you are, you want, and see if it's available. If it's open means that no one is using that online, and it can be yours.
You have to pay a monthly or annual fee to maintain that or basically own that custom domain name for yourself.
The first step is to buy that custom domain name, and then I will have linked some documents in the show notes. Essentially, where you can see exact, you can follow the same steps to actually connect that custom domain name with your own web.
Follow the exact steps in the resources links that I gave you in the show notes that are easy to follow with step by step guide. But I would highly recommend you if you're building a website that you want to look professional, and if you want something you want to maintain for the long term, you should definitely have a custom domain name.
If it's an app, if it's a company, you can have a custom domain name, anywhere.com. If it's just your own personal informational site, it can. You can buy a .info custom domain name cheaper than .com. Custom domain names are more professional-looking and more commercial and business-oriented.
It's your own choice. I'm just giving you some ideas.
So if you are new to Github, you can look at my ebook. My GitHub module in my ebook explains how you can essentially manage different branches on GitHub.
You can have a testing branch, and you can have production branches. You write your code on a testing branch, and then you publish that once you're happy with what you have in your code, you can just like merge that testing branch in your production branch.
Push that production branch to the hosting server. You're safe, and you are always sure what you are pushing to the production essentially.
Step Four: Make sure to add Google Analytics to your website
You can track different activities that users perform when they come to your website, like unique visitors every month, every day. These analytics are super helpful when managing, let's say, an e-commerce business or some SAS applications.
So, I mean, if it's just a personal website. You don't need to add Google analytics, but it is also a super exciting learning experience. If you want to add it.
Struggling to understand web development concepts? Let me teach you the right way. Check out my ebook HTML to React: The Ultimate Guide
To sum it up
Beyond just creating a website, there are a lot of moves you can make in order to make your site successful. From marketing to design, you want to consider many of the issues that come up with creating a website before you dive in.
This comprehensive guide can help get you started. I hope you enjoyed this article and learned how to host a website online so that your friends and family can check it out and feel proud of you.
More importantly, if you don't know how to create a website or write a code for building your website in the first place. My ebook HTML to react is the ultimate guide that will teach you exactly how to create responsive websites and reps, responsive applications.
And it goes into much more details, into what we just discussed. Everything we talked about today, like hosting, like all the tools that are involved in hosting and getting you up and running on the internet, and like always dream big and take massive actions. Cheers!