How to Change Website URL in Google Analytics

Cody Schneider8 min read

Switching your website to a new domain is a big step, but your work isn't done after migration. You need to tell Google Analytics about the change to keep your data clean and your reporting accurate. This guide will walk you through exactly how to update your website URL in Google Analytics 4, and we'll cover the essential post-update steps most people forget.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why You Can't Skip Updating Your URL in Google Analytics

You might think that because your tracking code is still on your site, Google Analytics will just figure out the new URL automatically. While GA4 is tag-based and will collect data from the new domain, failing to update the settings can lead to some messy data problems down the road:

  • Inaccurate Campaign Tracking: If your ad campaigns are still pointing to old URLs, you’ll have a hard time measuring their true performance.
  • Skewed Referral Data: Your old domain can start showing up as a top referral source, making it impossible to see where your traffic is actually coming from. This happens when someone clicks a link on your old site that redirects to your new one - GA mistakenly sees this as a "referral."
  • Broken Cross-Domain Tracking: If you use multiple subdomains or related sites, changing one root domain without updating GA can break how sessions are tracked across them.

Taking a few minutes to update your settings now saves you hours of trying to clean up and make sense of chaotic data later. It’s an easy win for data accuracy.

Updating Your URL: Universal Analytics vs. Google Analytics 4

How you change your URL depends entirely on which version of Google Analytics you're using. Universal Analytics (UA), which was sunsetted in July 2023, handled this differently than the current standard, Google Analytics 4.

The Old Way: Universal Analytics (For Reference)

Though data collection has stopped, you might still need to reference an old UA property. In UA, the website URL was a specific field you could easily edit.

You had to update it in two places:

  1. Property Settings: In the Admin panel, under Property > Property Settings, there was a field called "Default URL" that you could change from http:// or https:// and enter your new domain.
  2. View Settings: Then, under View > View Settings, you’d also update the "Website's URL" field to match the new domain.

This was straightforward but required updating it in multiple spots. GA4 simplifies this, but in a way that can be a bit confusing at first.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

The Right Way: Updating Your URL in Google Analytics 4

In Google Analytics 4, there isn’t a single "Website URL" field in the main property settings like there was in UA. Instead, your domain is tied to the Data Stream. A data stream is the source of data flowing into your GA4 property — in this case, your website.

Here’s the part that trips most people up: you cannot directly edit the original URL of an existing data stream. The URL you entered when you first created the stream is locked.

But don't worry, that doesn't mean you're stuck. Since GA4 is flexible, your tag just needs to be on the new site. The data will flow into the same measurement ID. Here's a practical guide on what to do.

Step 1: Verify the Google Tag is Correctly Installed on Your New Domain

This is the most critical step. Google Analytics 4 collects data based on your Measurement ID (G-XXXXXXXXXX). As long as the exact same Google Tag with the same Measurement ID is installed on your new website, GA4 will automatically start collecting data from the new domain right alongside the old one.

The "Stream URL" listed in your data stream settings is mainly used for settings like Enhanced Measurement (which automatically tracks things like outbound clicks and site search). Data will be collected from any domain where your tag is present, regardless of what's entered in that field.

To check what domains are sending data, you can build a simple report:

  1. In GA4, go to Reports > Engagement > Pages and screens.
  2. Above the data table, click the blue plus sign "+" next to "Page path and screen class."
  3. In the search box, find and select "Host name."

You should now see a list of hostnames (your domains) sending data to this property. After your traffic starts hitting the new site, you'll see your new domain pop up here. This is your confirmation that GA4 is tracking properly.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 2: Rename Your Existing Data Stream (Optional but Recommended)

While you can't change the stream URL, you can change the stream's name to avoid confusion. This is good housekeeping.

  1. Navigate to the Admin section by clicking the gear icon in the bottom-left corner.
  2. Under the "Property" column, click on Data Streams.
  3. Click on the web data stream for your website. This will open the stream details panel.
  4. Click the pencil icon next to the "Stream name" at the top.
  5. Change the name to something that reflects your new domain, like "yournewwebsite.com - Web Stream," and click Save.

This simple change ensures that when you or your team members look at your data streams, it's clear which one belongs to your current website.

The Post-Update Checklist: 4 Essential Housekeeping Tasks

Once you've confirmed data is flowing from your new URL, there are a few steps to ensure everything runs smoothly. Missing these can cause serious reporting headaches.

1. Create an Annotation for the URL Change Date

An annotation is a small note you add to your reports on a specific date. It serves as a reminder for why you might see a sudden change in traffic patterns or user behavior.

In GA4, you can create annotations by clicking "Add annotation" under any time-series chart in a detailed report. Make a note like "Migrated from olddomain.com to newdomain.com" on the day the switch happened. This context is invaluable six months from now when you've forgotten the exact date of the migration.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

2. Update Your Referral Exclusion List

This is crucial for preventing self-referral traffic from polluting your reports. You need to tell GA4 to ignore traffic that comes from your old domain.

  1. Go to Admin > Data Streams and select your web stream.
  2. Under "Google tag," click on Configure tag settings.
  3. Click the Show all button to reveal more options, and select List unwanted referrals.
  4. In the “Referrals to exclude” section:

Now, any redirects from your old site to your new one won't incorrectly be counted as referral traffic, giving you a much cleaner view of where users actually came from.

3. Link a New Google Search Console Property

Your Google Search Console account sends valuable organic search data to Google Analytics. Since GSC is tied to a specific domain, you'll need to create a new GSC property for your new URL and link it to your GA4 property.

  1. First, set up and verify your new domain in Google Search Console.
  2. In GA4, go to Admin > Product Links > Search Console Links.
  3. Click the blue Link button.
  4. If you’re logged into the correct GSC account, you will see a list of your properties. From here, choose the new GSC property you just created, link it to your data stream, and complete the process.

This relinks your organic ranking and keyword data to your GA4 reports.

4. Check Custom Reports, Dashboards, and Ad Campaigns

Finally, do a quick audit of anywhere you might have hard-coded your old URL:

  • Ads: Update the final URLs in any Google Ads or other ad network campaigns.
  • Reports: Check your custom reports in GA4 and any external dashboards (like Looker Studio) for filters that are based on hostname or page URL. Make sure they now reflect the new domain.
  • Goals/Conversions: Review your conversion events. If any were tied to specific destination URLs on your old domain, ensure a corresponding page/route structure exists on the new domain.

Final Thoughts

Changing your website's URL in Google Analytics 4 isn't about finding a single field to edit. It's about ensuring your Google Tag is working on the new site and then cleaning up the settings, from referral exclusions to product links, to keep your data trustworthy and your reporting clear.

Situations like a website migration highlight how fragmented marketing data can get. You're not just managing GA, you're coordinating with Google Ads, Search Console, and your CRM, hoping it all pieces together. This is where we built Graphed to help. We let you connect all your data sources in one place and then simply ask questions in plain English, like "Show me a dashboard of site traffic and conversions from GA4 before and after the migration," to get the full picture instantly, without having to dig through multiple tools.

Related Articles