Recently we installed a Contact Form 7 plugin on a website. They have a requirement of IP address logging to prevent spam as well as for record keeping. Learn how to log the user IP address in contact form 7.
IP Address in Contact Form 7:
- Open your desired contact form 7 you want to get IP Address.
- Copy the Below Code and paste in the Mail section of your Form.
After adding the above shortcode you will get the IP address of the user sending an email. Log the address or fight spam to block someone.
Control Spam with IP Address:
Further more you can stop spamming via contract form IP address. Fake contact form filling and auto robots makes inbox full with unknown emails. Blocking the IP address could help you to fight spam query emails. Learn how to block spam IP addresses via cPanel.
Block IP in cPanel:
- Open your cPanel (e.g.
- Scroll down and click IPBlocker.
- Now enter the IP Address (e.g. your IP address from email) and click Add.