Hi guys, today we’re going to see how you can host a complete website on Google Drive for free. So let’s say you have an HTML website like this, where when we open the HTML file, we’re able to see the website, and right now, these website files are stored locally on our computer.
Now, how can we make this website live on the internet? Yes, we can use Google Drive to post it for free. Just like any other hosting provider, Google Drive will store your website files and make a site available on the internet like this. Anyone can use this URL and go to it to access the site. In today’s article, I’m going to show you exactly how to do this, and the best part is that this is absolutely free, and you get a storage space of up to 15GB. Before we start, there are a few things to keep in mind. Your site might be a bit slower, and you can only host a basic website like this, which is built using HTML. Also, no database management will be supported, which means you cannot use WordPress or any other CMS platform. So if you’re just looking to host a simple website, Google Drive is perfect. But if you need something dynamic, like an e-commerce website or a faster-performing website, you can check out these two videos. Alright, now to host a website on Google Drive, make sure your website files are ready like this, and your HTML file must be named index.html. Now, to host our site, we are going to do three steps. The first step is to create an account on Google. If you already have an account on Google, I still recommend that you create a new one that you can use just for your website. So to create a Google account, go to your Chrome browser. Now click here, click add account, click create account, select for personal use, enter your details, click next, again enter the details, and click next. Now we need to choose an email address.
We need a new email, so let’s click here. And enter the email ID you want. Now click next and set your password. Again, click next, scroll down, and click I agree. Okay. Now, as you can see, we have successfully created our new Google account. And once you’ve done that, let’s move on to the second step, which is to upload your website files to Google Drive. So to upload your files, just go here and click Google Drive. Now we need to create a new folder for our website. So, click New Folder and give a name for the folder. This name must be the same as your website’s domain name. My website name is foodfresco.com. So I’m going to enter www.foodfresco.com. It is important that you enter www. in the beginning. So make sure you include it and click Create. Now to upload our files, let’s open this folder. And then drag and drop the files here. As you can see, we have successfully uploaded the files. Once you’ve done that, in order to host our website, we need to make this folder public. So to do that, let’s click here, right-click on the folder, then go to share, and click share. Now click here, click anyone with the link, and click done. Okay, so now that our folder is public, let’s go to the final step, which is to start hosting our website. To do that, open a new tab, type drv.tw, and press enter, and you will get this site. Since we are going to host our site on Google Drive, let’s select this and then select the Google account. Now click Allow, and that’s it. Our website will be hosted, and this is the link to our website. If we click on it, you can see we are taken to our website. This means that our site is now live on the internet, and anyone can access it by going to this address.
Okay, guys, so now we exclusively host our site on Google Drive. But if you look here, there’s a problem. This picture isn’t showing up on our site. When you use Google Drive to host your website, some images might not work properly, and they look like this. But don’t worry; we can fix it. We just need to change the code for this image in our website’s HTML file. Let me explain how. Let’s open a new tab and go to imgbb.com. Now we need to find the image that is not loading and upload it. This is the image. So let’s drag it and drop it and make sure this is set to don’t auto-delete and click upload. Now go here and select HTML Full Link. As you can see, we’ve got the HTML code for this image. So let’s copy it. Now to change it in our HTML file, let’s go back to our Google Drive. And here you can see our HTML file. To change the code, first let’s download this file. Click here and click download. Now let’s open it. Right-click, go to open with, and select Notepad or any text editor of your choice. We’ve got the HTML code for our website. Now go to the code of the image you want to change. For me, this is the code of the image, which didn’t work. So to change it, just select the code and paste the new code. Once you’re done, go to the file and remember to save it. Now if we go back to our Google Drive, the html file that you see is the old file where our image doesn’t work.
So let’s upload the new html file here. Just drag and drop the new file that we saved, select replace, and click upload. Okay, so now we’ve updated the code in our HTML file. So, now if we go back to our site and click refresh, you can see that our image is now working. Okay, so this is how you can fix all the images that are not working on your site. And once you’ve hosted your site and it’s live on the internet, what if you want to make new changes to your site? Well, it’s easy. Just like we did before, you can download the HTML file and make all the changes to your code. And once you’re done, you can upload the updated HTML file to your Google Drive. And the changes will be updated on your site as well. Okay, now if you see here, this is what the URL of your website looks like. This is a random domain name, which we got from Google. If you’re satisfied with this, you can go ahead and share it with people. But if you want to have a new domain name like this, which looks much more professional, you can do it by getting a custom domain name. You’re in luck, because next I’m going to show you how you can get a custom domain name for your website. So to do that, we’re going to do two steps. The first step is to get a new domain name. Just click the link below this video, and it will take you to this website. Now here, enter the domain name you want. Make sure the name you enter here is the same as the folder name we created on Google Drive. Now click search, and as you can see, it is available. So click get domain, and now click add to cart. And here you can see we’re getting the domain name for one year. Now scroll down, enter these details, enter your payment details, and click checkout. And as you can see, we have successfully obtained our domain name. And once you’ve got the domain, let’s go to the second step, which is to connect this domain with our website. And once we do that, when someone searches for this domain name, they’ll be taken to our website.
So to do that, just go to Manage DNS and click Add Record. Now go to type, select CNAME, and under name, enter www. Here, we need to enter the CNAME of our website. To get it, let’s go back to this page, copy this URL, go back, and paste it here. Now make sure to remove this part, as it is not necessary. Also, remove this HTTPS part, and once you’re done, click confirm. And that’s it. We have successfully connected our domain. So now, if you open a new tab and go to our domain, you can see that we’ve got our website. So, this is how you can get a custom domain for your website. Okay, so that’s it, guys. Now you know how to host a website on Google Drive.