Site icon Css3 Transition

How to Use Google Drive as Free CDN for your website (Content Delivery Network)

Google Drive as Free CDN for your websit

Google Drive as Free CDN for your websit

How to Use Google Drive as Free CDN for your website  (Content Delivery Network)

After Google introduce Google Drive site publishing feature, Now you can upload static files like CSS,HTML & Javascript . Since Google is offering 15GB of free space you have enough space to upload images and video files as well. .Still when comparing to cheap shared hosting, google drive is a good solution because Google have servers with lot of resource and they have servers in multiple locations which helps to deliver your content faster than normal shared hosting server.

 

Let’s Start..

 

Once you are inside you can see that “Who has access” settings is by default set to “Private – Only you can access”. Change it to “Public on web” and save it.

Now just copy your website files into that folder you created.

Then copy the folder ID from the address bar. Once you are inside the folder you created, The address in the address bar should look like bellow address
“https://drive.google.com/drive/u/0/folders/0ByGpd2QD5Q_kiWW52eV96aVNzN1E” and the folder ID is the part after “https://drive.google.com/drive/u/0/folders/”
So folder ID is 0ByGpd2QD5Q_kiWW52eV96aVNzN1E

Now your website is alive at http://googledrive.com/host/YOUR_ID_HERE. Please replace the YOUR_ID_HERE with your Folder ID. So in this case it should be http://googledrive.com/host/0ByGpd2QD5Q_kiWW52eV96aVNzN1E

 

Creating sub-domain for your CDN

You will need to create a sub-domain for this..

Log in to your domain control panel (e.g. Godaddy) Your Account > Domain > Your Domain > Manage Domain > All Host Records > Create a new sub-domain > Click Save (Name your subdomain as static)
Host Name: static
IP Address/URL: http://googledrive.com/host/folder-id
Record Type: URL Redirect
TTL: 1800

Now you can use this new sub-domain as your CDN URL like this http://static.domain.com/image.jpg.

 

If you found this article helpful, then please share it with someone else by using the buttons in the left. Thank you!

Exit mobile version