Filtering Out Traffic That Is Not From Your Website

June 1, 2010

It sometimes happens that someone will accidentally use your GA Web Property ID (UA-xxxxx-y) in their website.

When this happens, pageviews and visits from their website will show up in your GA reports.

To prevent this, you can create a filter and apply it to your main profiles.

Include hostname filter

The screenshot shows the use of a Custom -> Include filter on the Hostname field.  This example is for the site

We are only including pageviews that happen on a domain that matches the regular expression “”.  This will match all of your subdomains such as or

Website spanning multiple domains:

If you have a website that spans multiple domains such as and and, then instead of filtering on “” you simply list all your domains, separated by a pipe:

Instead of:


If you have a profile that doesn’t have any filters on it, for raw data and troubleshooting, make sure you don’t add this filter to that profile.