How to Use a Custom Domain with Your Google Drive Website

Take your project to the next level. Go from drvx.net/MySite to MySite.com for free using the power of Cloudflare.

Last Updated on July 20, 2026 by The DriveX Team
A diagram showing drvx.net and a custom domain connected by Cloudflare

You've successfully generated your site and it's live on the internet. That's a huge step! Your site is fast, secure, and live at a URL like drvx.net/MyPortfolio.

But for a professional portfolio, a business, or a final project, you need that clean, branded URL: MyPortfolio.com. Many services charge extra for this, but you can do it for 100% free.

This guide will show you how to point your own domain name to your DriveX site using a free tool called Cloudflare Workers.

What You'll Need (Prerequisites)

This tutorial assumes you already have two things. This is the only setup required.

  • A domain name you already own (e.g., from Namecheap, GoDaddy, etc.).
  • Your domain connected to a free Cloudflare account. (Cloudflare has guides on how to do this—it just involves changing your nameservers).

We will be using a feature called Cloudflare Workers to act as a "reverse proxy." It's a fancy term for a simple job: when someone visits YourDomain.com, the Worker will instantly fetch the content from your drvx.net/YourSite and show it to them, all while keeping your custom domain in the address bar.

The 3-Step Process: A Step-by-Step Guide

This entire process takes about 10 minutes. Let's begin.

Step 1: Configure Your DNS in Cloudflare

First, we need to create a "placeholder" DNS record. The Worker will attach to this record.

  1. Log in to Cloudflare and navigate to the DNS section for your domain.
  2. Click Add record.
  3. Fill in the following details exactly:
    • Type: A
    • Name: @ (This means your root domain, e.g., yourdomain.com)
    • IPv4 address: 192.0.2.1
    • Proxy status: Proxied (Make sure the orange cloud is ON).

What is this IP?

The IP address 192.0.2.1 is a special placeholder reserved for documentation. It doesn't actually go anywhere. Since our Worker will intercept all requests, the actual IP doesn't matter.

Step 2: Create the Cloudflare Worker

Next, we create the "brain" of the operation. This is the script that forwards the request.

  1. From the Cloudflare sidebar, go to Workers & Pages.
  2. Click Create application, then Create Worker.
  3. Give your Worker a name (like my-site-proxy) and click Deploy.
  4. On the next screen, click Edit code.
  5. Delete all the default code in the editor and paste in this exact script:
export default {
  async fetch(request) {
    let url = new URL(request.url);

    // This is the target host
    url.hostname = "drvx.net";
    // This is your specific site path
    url.pathname = "/MyWeb" + url.pathname;

    // Fetch the content from the new URL
    let response = await fetch(url.toString(), {
      method: request.method,
      headers: request.headers,
      body: request.method !== "GET" && request.method !== "HEAD" ? request.body : undefined,
    });

    return response;
  }
}

CRITICAL: Edit Line 7

You must change line 7. Replace "/MyWeb" with your actual DriveX site path (e.g., "/MyPortfolio" or "/MyLandingPage").

After editing, click Save and Deploy.

Step 3: Connect the Worker to Your Domain

This is the final step. We tell the Worker to activate when someone visits your domain.

  1. Inside your Worker's dashboard (after saving), click the Triggers tab.
  2. Under the Routes section, click Add route.
  3. Enter your domain with a wildcard at the end:
    • Route: yourdomain.com/* (Replace yourdomain.com with your actual domain)
    • Zone: Select your domain from the dropdown.
  4. Click Add route to save.

You're All Set!

That's it! Wait about a minute for the changes to apply globally. Now, when you visit yourdomain.com, it will serve the content from your drvx.net/MyWeb site, and visitors will only see your custom domain in the address bar.

You now have a professional, fast, secure, and free website hosted on your own custom domain.