How do I protect my D2C store from DDoS attacks and bad bots?
Practical protection for small D2C brands against DDoS attacks, scrapers, card testing and fake sign-ups: CDNs, AWS Shield, WAF rules and rate limits.
Anadoris Digital · · 4 min read

Not every traffic spike is good news. Some come from bots scraping your prices, testing stolen cards on your checkout, creating fake accounts to abuse a sign-up offer, or flooding your site to knock it offline. During a sale or a limited drop, bots can also try to buy up stock before real customers get a chance.
Small brands are not too small to be targeted. Automated attacks scan the internet for anything reachable. The aim is not perfect protection but sensible layers that stop common attacks cheaply and alert you to the rest. Each layer should be simple enough that your team understands what it blocks and how to adjust it when a real customer gets caught.
Know what you are defending against
- DDoS attacks: floods of traffic meant to overwhelm your site or API.
- Scrapers: bots copying prices, product data or content.
- Card testing: bots trying stolen card numbers through your payment flow.
- Credential stuffing: bots trying leaked passwords on customer or admin logins.
- Fake sign-ups and coupon abuse: bots exploiting first-order discounts or referral offers.
- Inventory hoarding: bots adding limited stock to carts to block real shoppers.
What hosted platforms already cover
Shopify and similar platforms protect their storefronts and checkouts with their own network defences and bot protections, and payment gateways run fraud checks. You still choose settings, such as requiring verification on account creation and enabling the fraud tools your gateway provides. The bigger gap is anything custom: a headless frontend, an API, a webhook receiver, an internal tool or a promotional microsite.
Layers for the systems you own
- Put every public endpoint behind a CDN such as CloudFront, which includes AWS Shield Standard for common network-level attacks at no extra charge.
- Keep origins private so attackers cannot bypass the CDN and hit servers directly.
- Add AWS WAF with AWS managed rule groups for common web exploits and known bad sources.
- Use rate-based rules to limit how often one source can call login, sign-up, coupon or checkout-related endpoints.
- Consider AWS WAF Bot Control or a CAPTCHA or challenge on sensitive actions such as sign-up.
- Verify Shopify webhook signatures so only Shopify can trigger your order processing.
- Protect admin tools behind single sign-on or an IP allow list, not just a password.
Other providers, such as Cloudflare or Akamai, offer comparable layers. Choose based on where your systems run and what your team can manage. Check current pricing for firewall rules, bot control and request volumes before enabling them broadly.
Watch for unusual patterns
Turn on WAF logging and set alarms for sudden rises in blocked requests, error rates or traffic to sensitive endpoints. Watch business signals too: a burst of failed payments, many new accounts from similar email patterns, or a coupon redeemed far more than expected. These often reveal bot activity before infrastructure metrics do. Share a short list of these signals with your support and marketing teams, who are often the first to notice odd orders or complaints.
During an attack
- Confirm it is an attack, not a successful campaign, by checking sources and patterns.
- Tighten rate limits or enable challenge rules on the affected paths.
- Block clearly malicious sources, countries you do not sell to, or specific patterns, temporarily.
- Pause affected offers if coupons or sign-up rewards are being abused.
- Contact your provider's support if the attack overwhelms your defences, and tell your payment gateway if card testing is involved.
- Afterwards, record what happened and turn the temporary rules you kept into permanent ones.
AWS Shield Advanced adds dedicated DDoS response support and cost protection features, at a significant subscription cost. Most small brands do not need it, but check current terms if you face repeated large attacks.
Protect admin and staff logins too
Attackers often go after the people rather than the website. Staff accounts on Shopify, your AWS account, email and courier dashboards are valuable targets, and a stolen password can do more damage than any flood of traffic. Require multi-factor authentication on every staff login, remove accounts for people who have left, and give each person only the permissions they need.
For custom admin tools, avoid exposing login pages to the whole internet where you can. Place them behind single sign-on, a VPN or an IP allow list, and add rate limits and alerts for repeated failed logins. These steps block a large share of automated attacks without any effect on customers.
Where to start
List every public endpoint you own outside your commerce platform. Make sure each one sits behind a CDN with its origin hidden. Add AWS WAF with managed rules and a rate limit on login and sign-up routes, and turn on logging. Then review your payment gateway's fraud settings and your store's account sign-up protections before your next sale or drop, when bots are most active.
Related service: AWS & Cloud Management · More on this topic: AWS & Cloud Management articles
