AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

1.9K members online now
1.9K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
Guide Me

Regular Expression filter excluding main domain not working

[ Edited ]
Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi Community!

I'm having problems making work a particular Regex for excluding a particular domain. 

Maybe someone out there can help me solve this in a much easier way (or actually make this work) 



The view filter I need to create is the following: 

-Exclude my main domain: + +

 -- Without excluding the following subdomains:



I've created the following Regex with the following settings but it's not working: 

Filter type: Custom

Filter Field: Hostname

Filter Pattern: (\w*|www\.)qwilr\.com(\/\w*)?


Can anyone tell me what's wrong with that regex or if there is something else I can do? 

Regular Expression filter excluding main domain not working

[ Edited ]
Participant ✭ ✭ ✭
# 2
Participant ✭ ✭ ✭

Hi Santi,


This regex should work properly: ^(www\.)?qwilr\.com$


You can test it out with this tool:


Let me know if it helps @Santi C.