Where to Find the Google Analytics 4 Hostname Dimension?
Hunting for the Hostname dimension in Google Analytics 4? You're not alone. While it was a default, easily accessible dimension in Universal Analytics, GA4 requires a few extra clicks to find it. This simple guide will show you exactly where to find the Hostname dimension, how to add it to your standard reports, and how to use it in custom Explorations for more powerful analysis.
What is the Hostname Dimension?
The Hostname is simply the domain (and any subdomain) where your Google Analytics tracking code was triggered. Every time a user visits a page and your GA4 tag fires, it records the hostname of that page.
For example, if a user visits a page on your blog, the hostname might be blog.yourwebsite.com. If they then visit your main company page, the hostname would be www.yourwebsite.com. And if your tracking code somehow ends up on a strange, unrelated site (it happens!), you'll see that odd domain show up as a hostname, too.
Why is This Dimension So Important?
Understanding which hostnames are sending data to your Google Analytics property is fundamental for a few key reasons:
- Filtering Out Spam and Ghost Traffic: The most common use for the hostname is to scrub your data of junk traffic. If you see activity coming from domains like anone.de or trafficforless.biz, or other unrelated hostnames, it's a clear sign of referral spam polluting your reports. Ignoring this can inflate your traffic numbers and skew your performance metrics.
- Analyzing Subdomain Performance: Many businesses use subdomains for different parts of their site, such as
blog.yourcompany.com,shop.yourcompany.com, orhelp.yourcompany.com. The hostname dimension allows you to segment your reporting and see how each part of your digital ecosystem is performing individually. You can answer questions like, "Does our blog bring in more new users than our main site?" - Verifying Technical Setups: When you're migrating a site or want to check traffic on a development server (e.g.,
dev.yourwebsite.comorstaging.yourwebsite.com), the hostname dimension confirms whether that traffic is being incorrectly sent to your live production property. It's also an essential tool for verifying that cross-domain tracking is working correctly.
Without checking your hostnames regularly, you're likely making decisions based on data that's incomplete or downright inaccurate.
Finding the Hostname in a Standard GA4 Report
Out of the box, GA4 standard reports like the "Pages and screens" report do not show the hostname. You can see the page path (e.g., /blog/sample-post), but not the domain it's on. Luckily, you can add it by customizing the report.
Here’s how to do it step-by-step:
Step 1: Navigate to the "Pages and Screens" Report
In the left-hand navigation panel of your GA4 property, go to Reports → Engagement → Pages and screens.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Step 2: Customize the Report
In the top-right corner of the report interface, you'll see a small pencil icon labeled "Customize report." Click this to enter the report editing screen.
Step 3: Add "Hostname" as a Dimension
On the right-hand side, a "Customize report" panel will slide out. Under the Report Data section, click on Dimensions.
This shows you all the dimensions currently available in this report. Click the blue "Add dimension" button.
A search bar will appear. Type "Hostname" and select it from the list. It will now be added to the bottom of your dimensions list.
Step 4: Apply and Save Your Changes
Make sure to hit the blue "Apply" button in the bottom right of the "Customize report" panel. You'll now see a dropdown menu for the primary dimension in your table that includes "Hostname."
Select "Hostname" from this dropdown to update the table and view all your traffic metrics broken down by domain. To make this change permanent for this report, click the blue "Save" button and choose "Save changes to current report."
Now, whenever you visit the "Pages and screens" report, "Hostname" will be available as a primary or secondary dimension.
Using Hostname in GA4 Explorations for Deeper Analysis
While adding the hostname to a standard report is useful for a quick check, the real power comes from using it in a GA4 Exploration. Explorations offer far more flexibility for slicing and dicing your data.
Let's build a simple free-form report to analyze your top hostnames.
Step 1: Open a New Exploration
In the left navigation, click on Explore and select Blank to create a new exploration from scratch.
Step 2: Name Your Exploration
Give your exploration a descriptive name, like "Sessions by Hostname."
Step 3: Import Your Dimensions
In the "Variables" column on the left, you'll see a section for Dimensions. Click the "+" icon to add new dimensions.
Use the search bar to find and import the following:
- Hostname
- Session source / medium
- Page path and screen class
Check the box next to each and click the blue "Import" button in the top right.
Step 4: Import Your Metrics
Next, do the same for Metrics. Click the "+" icon and import the metrics you care about. A good starting set would be:
- Sessions
- Engaged sessions
- Total users
- Conversions
- Event count
Again, select what you need and click "Import."
Step 5: Build Your Table
Now it's time to build your report. Under the "Tab Settings" column:
- Drag the Hostname dimension from the "Variables" section and drop it into the Rows field.
- Drag the metrics you want to see (e.g., Sessions, Total users, and Conversions) into the Values field.
The table canvas will instantly populate with your data, showing your chosen metrics for each hostname that has sent traffic to your GA4 property.
Step 6: Drill Down for More Granular Insights
From here, you can get much more specific. For example:
- See Traffic Source by Hostname: Drag the Session source / medium dimension into the Columns field. Now you can see not just how much traffic each subdomain gets, but where it's coming from (Google organic, direct, social, etc.)
- Analyze Top Pages by Hostname: Replace "Session source / medium" in the Columns field and add Page path screen class to the Rows field below "Hostname". This will produce a nested table showing you the specific top pages for each given subdomain.
Common Use Cases for Hostname Analysis
Once you've built your report, you can start putting it to work. Here are three common scenarios where this report is invaluable.
1. Cleaning Up Spam Traffic
Looking at your new Hostname report, do you see domains you don’t recognize? If you see suspicious hostnames sending traffic but displaying engagement metrics like 0s average session duration or 100% bounce rate, it's almost certainly spam. Not only is this traffic worthless, but it also waters down your real data, making it hard to see true performance.
To fix this, you need to create a filter to block this traffic. In GA4, you can do this from the Admin panel:
- Go to Admin → Data Settings → Data Filters.
- Click "Create filter."
- Choose "Include only" and set the new filter to only include events where the Hostname is
yourdomain.com.
Testing and activating this filter will ensure your reports only include traffic from your own specified hostname, so it is important not to forget subdomains.
An easier method is to add report-level "Exclude" filters with OR conditions:
Hostname does not match regex (www\.mysite\.com|blog\.mysite\.com)
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
2. Comparing Subdomain Performance
If you have both www.yourbrand.com and blog.yourbrand.com, you've likely wondered which one brings in a more valuable audience. Here's where the Hostname exploration really shines. You can directly compare:
- Sessions and Users: Which domain gets more raw traffic?
- Conversions: Which contributes to the most important business goals? For many companies, a call-to-action on the blog will refer users to the main site, and without cross-domain tracking, this activity will be attributed to "self-referrals." Using Hostname data to analyze this problem often results in implementing a robust cross-domain tracking setup, which we will cover in a future guide.
- Event Count: Is one domain driving engagement with key on-site elements like video plays, form submissions, and so on?
3. Checking for Development Traffic
Developers often forget to remove tracking codes when launching a new product. As a result, you can start seeing sessions on your live property coming from domains like dev.yourwebsite.com or seeing internal activity from third-party services that render a test webpage but leave the GA snippet intact. By identifying traffic sources like that, the Hostname report will allow you to take action and either remove the unwanted tracking ID or implement proper server-side exclusions so this data never appears again in your reporting views.
Final Thoughts
Getting comfortable with the Hostname dimension is a necessary step in mastering your GA4 data. It’s the key to maintaining data quality by filtering spam, opens the door to deeper analysis of subdomains, and provides a quick health check for your technical setup. By saving it in your standard reports and building detailed Explorations, you ensure you're working with the cleanest, most trustworthy data possible.
Of course, this becomes especially important when you’re pulling in data from multiple places at once. We built Graphed because we were tired of hopping between Google Analytics, Shopify, our ad platforms, and our CRM just to see the full picture. After connecting your accounts, you can just ask in plain language, "Show me our GA4 sessions by hostname compared to last month," and get a clean, live report in seconds. It allows you to skip the manual report-building and get right to the answers that help you grow.
Related Articles
Facebook Ads For Dental Practices: The Complete 2026 Strategy Guide
Learn how to effectively use facebook ads for dental practices to attract new patients to your dental practice. This comprehensive 2026 guide covers targeting, budgeting, creative strategies, and ROI expectations.
Test: Facebook Ads For Dentists 2026
Test excerpt
Facebook Ads for Landscapers: The Complete 2026 Strategy Guide
Learn how to run profitable Facebook ads for landscapers in 2026. This complete guide covers audience targeting, ad formats, budgeting, and optimization strategies to generate leads at $30-50 per lead.