How to block bots?

Topic summary

A Shopify store owner is experiencing spam newsletter signups from the email domain “rtremail.com,” suspected to be bot-generated rather than legitimate subscribers. The signups appear related to Right to Represent documents from recruiters.

Proposed Solution:
A community member provided JavaScript code that adds frontend validation to block submissions containing “rtremail.com” emails. The code:

  • Targets the newsletter form (ID: #ContactFooter)
  • Prevents form submission if the email contains the blocked domain
  • Includes console logging for debugging

Important Note:
The form ID (#ContactFooter) is theme-specific and may need adjustment based on the store’s theme implementation.

Status: The original poster thanked the responder, finding the solution helpful. However, the discussion doesn’t confirm whether the code was successfully implemented or if it fully resolved the bot signup issue.

Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

Trying again:

I have received many signups to my newsletter from the email domain “rtremail.com” which I suspect of being a bot and not a real email address. I’ve searched online for more information about rtremail and all I keep getting are links about Right to Represent documents from recruiters. Can someone please confirm that I can delete these @rtremail.com subscribers because they are not real?

1 Like

Hi Roland,

You can try out this code block. This code will add a frontend check, if the email entered contains the rtremail.com then it will not submit the form.

The #ContactFooter is the ID of the newsletter form of my theme. Your theme can have a different ID for the newsletter form.

Feel free to revert if you need further assistance and do let me know if it helps.

Thanks.

2 Likes

Thank you very much for this – it may be helpful.