One of Google Analytics’ greatest charms is its ability to be highly customized. However, sometimes the ability to tinker with its infrastructure comes with risks. One of those risks is the unassuming but potentially deadly Default Page setting.
The Default Page Setting Hates Kittens
That’s just raw, Google!
For people who might be confused about what the Default Page setting does, Google has provided this very helpful tool tip when you hover over the question mark:
Enter the default page for your domain so that multiple URLs that point to the same page are treated as the same entry in your reports. For example, if example.com and example.com/index.html both open the same page, you can enter index.html in this field.
I can’t tell you how many of these errants entries I’ve caught in analytics audits. Someone sees that their site uses an index page (usually .php or .aspx, not .html) and enters it into this field.
The problem with this approach is that if you drop an index page into this field, Google will append every request URI (geek speak for the URLs you see in your content reports) with whatever you enter into this field.
My Test That Resulted In Frankendata
For the sake of science, I decided to trash my Test view by adding index.html into my Default Page setting. Check out my All Pages report:
It’s like my data died and woke up in index.html hell. If you thought this setting would help you clean up your reports, you will probably be sorely disappointed.
So what happens when you add something into that field is Google appends it to the end of every URL in your content reports that ends in a forward slash. And if those pages aren’t real, when you click the target icon to the right of every URL in a content report, you will be met with a 404 page.
A Better Alternative
Behind Curtain 1
The best way to handle a site that allows visitors to access a page from two different URLs like it’s 2007 (e.g., /my-page/ and /my-page/index.php) is to have the /index.php version redirect to the /my-page/ page. This is both better for your SEO and analytics.
Behind Curtain 2
If your developers are on strike or too busy playing Candy Crush to set that up for you, the next best alternative, in my opinion, is to use a Search and Replace filter in Google Analytics to remove the index pages. I demonstrate how to set this up in the video below (with two alternatives because I’m just that accommodating).
Maanikamili says
Amazing .. I will bookmark your blog and take the feeds additionally? I’m satisfied to find so many helpful information here within the put up, we want work out extra strategies in this regard, thanks for sharing..
Hector says
Thanks! Just fixed it on one of the sites that I look over now. You rock.
Annie Cushing says
Happy to help!
Christian says
Hello,
thank you for this article. In fact I entered some values in that field in some properties.
Actually I haven’t fully understood how to really solve this problem. What do you mean by saying:
“The best way to handle a site that allows visitors to access a page from two different URLs like it’s 2007 (e.g., /my-page/ and /my-page/index.php) is to have the /index.php version redirect to the /my-page/ page.”
Does it mean to modify the .htaccess-file or … ?
And: Should I leave the field “Default page” empty – or not? As this field exists – it seems to be of value. But in which cases? Maybe you could point that out.
Thanks and keep up the great work
Annie Cushing says
Yes, that’s what I mean. There are other SEO-related reasons it’s better to have redirects set up. And yes, I’d always leave that setting empty. It’s a menace and does more damage than good.
Christian says
Thank you!
Caitlin McCluskey says
I follow your article for the most part but I’m still stuck on what to do if this has ALREADY been set and I’m trying to fix it? A Search and Replace filter would be better than just removing that from the Default Page field altogether?
If I do remove that from the field, will it apply retroactively or no? Is there ANY way to clean up the historical data caused by this being implemented incorrectly?
Annie Cushing says
No, Google doesn’t allow you to reprocess data. ?
Geo says
Hi Annie, Do you know if there has been an update within google analytics to ensure that the frankendata doesn’t expose your site with the added default page. When I found that we had this default page entered here, I quickly went to review my data and found that it didn’t append the page at the end of the URL’s so maybe we were lucky and will follow up with a filter instead but was wondering if this was a bug that was fixed within GA.
Annie Cushing says
I love it when the GA team quietly fixes something. Yes, it appears that the setting does absolutely nothing now.
Nathan Driver says
Came across this post searching for insight. Upon GA “Analytics Notifications” I set the default page with something besides “/” and bounce rate jumped over 25%. Changed the settings back and it remained. I just did your suggestion with search and replace so hope to see better numbers soon.
Thought you might be interested to know in the BR jump just from this setting.
Annie Cushing says
I’m not sure what you mean by this: “Upon GA “Analytics Notifications” I set the default page with something besides “/” …” And the Default Page setting shouldn’t affect bounce rate.
Leyna says
Hi! If I do this, will the data merge in the GA reports?
For example, if “/” has 10 pageviews and “/.index.html” has 10 pageviews, and I do the “Search and Replace” filter, will the new data display as 20 pageviews?
Thanks!
Annie Cushing says
Oddly enough, Google very quietly turned off the impact of this setting. I set it up on a test view (screenshot: https://www.screencast.com/t/I2UmJ09YydOW) when I was running a test for this post. And you can see that on May 9th last year all pageviews to pages ending in index.html dropped to 0. This was a change that was obviously backdated since this post was published a month later.
Philip Pellat says
I wish I could get this to work.
Any thoughts?
Annie Cushing says
More details?
Cyndi Smith says
Great post! Thank you so much. The video was very easy to follow so I could figure out how to apply a filter to undo the mess I made with my data by including index.php for a few days in the default page field. GAH! I wish I’d never done that!
Annie Cushing says
Happy to help!
Abby Buzon says
Oh my God, you crack me up! I’m so glad I found you!
I just went to give a client their 1st monthly Analytics report after launching their new site. To my unpleasant surprise, it’s the first I noticed the retro”index.htm” addition to all my tidy 2018 URL’s. Now I gotta go clean up this disco of a mess.
THANK YOU!
Annie Cushing says
There ya go! Happy to help! ??
Amir says
So what happens when you remove that setting? Will it affect the data collected in the past in a good or bad way? Will you end up with two different links now or will it adjust the past collected data?
Annie Cushing says
It only affects reports moving forward. Google doesn’t allow you to modify historical data.
Bukunmi Adewumi says
Hey Annie,
Many thanks for the helpful tutorial. I have resolved my blog’s junk /index.html to just / now. So easy to implement with the video.
Annie Cushing says
Perfect!
Terry says
I have pages showing up as .com (with no forward slash) and .aspx…..so i have many duplicate pages in GA reports – with no forward slash and with .aspx., which leads me to believe the filter won’t work?
Annie Cushing says
Hi Terry, I’m not sure what you’re asking.
Terry says
Hi – here’s an example of what I mean:
/en/shop/fencing.aspx
/en/shop/fencing
if there is no forward slash after the second URL (/fencing), the filter won’t work?
thank you!
Andrea says
Hello! Great post. One question? Does the find and replace Filter work backwards, I mean does it clean up all analytics data? I’ve tried but it does not seem to work. I says that “This filter would not have changed your data. Either the filter configuration is incorrect, or the set of sampled data is too small.” but i’ve double checked and it seems to be exactly set up as in your video , I still see index.html in the Analytics Page Results
Annie Cushing says
Thanks for the kind words! Unfortunately, none of the filters work retroactively. You have to clean your data up in Excel, your database, or your dashboard.