You are currently viewing How to Host a Website on Google Drive and Use a Custom Domain

How to Host a Website on Google Drive and Use a Custom Domain

  • Post author:
  • Post category:HOSTING

Overview:

You can use Google Drive to host static websites, including HTML, CSS, JavaScript, icons, images, audio, and video. Here’s a guide to help you do it step by step.

Advantages:

 • Free: Save hundreds of dollars per year in web hosting.
 • Secure: No bandwidth limits, and reliable uptime with Google’s servers.
 • No FTP Needed: Simply replace the file in your Google Drive folder to update your site.

Disadvantages:

 • Static Content Only: Does not support dynamic websites made with WordPress, Joomla, or PHP.
 • URL Structure: Google Drive URL structure cannot be customized, but custom domains can be used.

Steps to Host Your Website on Google Drive:

 1. Prepare Your Website Files:
 • Ensure you have an index.html file as the entry point.
 2. Upload to Google Drive:
 • Drop your website folder into Google Drive, preferably in the root directory.
 3. Make the Folder Public:
 • Right-click the folder and select “Get shareable link.”
 • Ensure the folder name starts with www.
 4. Use DRV.TD to Generate the URL:
 • Open a new tab and go to drv.td.
 • Select Google Drive and sign in with the associated email.
 • Click “Allow” to generate the URL.
 5. Custom Domain Configuration:
 • Copy the generated URL.
 • Login to your domain provider (e.g., Namecheap).
 • Remove any previous name servers.
 • Add a new CNAME record:
 • Host field: www
 • Value field: Paste the generated URL, removing https prefix and anything after drv.td.
 • TTL field: 30 minutes
 6. URL Redirection for Non-WWW Access:
 • Add a new URL redirect record for non-www access.
 • Value field: http://yourdomain.com

DNS Propagation:

 • DNS changes can take up to 48 hours to propagate globally.
 • Use tools like whatsmydns.net to check propagation status.
 • Use kproxy.com to bypass DNS and local cache to check your site before propagation completes.

Enhance Website Speed:

 1. Create a Cloudflare Account:
 • Go to cloudflare.com and create an account.
 • Add your domain and choose the free plan.
 2. Configure Cloudflare:
 • Copy the value of the CNAME record.
 • Create a new TXT record in Cloudflare:
 • Name field: www
 • Value field: Paste the copied text and add drv.tw=
 • Add the record and copy the DNS values.
 3. Update Domain Name Servers:
 • Return to your domain provider and paste the DNS values in the name server fields.
 • Save the settings.

Congratulations! Your website is now online with no hosting costs.

This page has 35 views.