How to not log anonymous visitors who visit IP

Hello, does anyone know how I can not log bot visitors which come direct to IP and not to domain (Mautic 4.4.2)?

I am sure there is a techy php code method, but you can set a campaign to delete visitors who are anon, or perhaps visit the IP address. I have not tested if the latter is possible