Block access to web pages but allow teamviewer


I have done a new rule where the pc can´t use the port 80, except when it try to access to, (any server of teamviewer) but it doesn´t work. I have done another rule where the pc can connect to any address with the port 5938 but the teamviewer host is not connected. Why?