To block Ahrefs bot traffic on Shopify, add a rule to your store's robots.txt file through a theme template called robots.txt.liquid. The rule is Disallow: / for the AhrefsBot user agent. Shopify has no server files to edit, so this template is the Shopify way. Ahrefs says its bot obeys robots.txt.
Most guides leave out two things. Blocking an SEO tool on your store doesn't hide your backlinks, because the tool finds those links on other people's sites. And if you use the tool yourself, its audit crawler has a different name. Block that too, and your own audits stop.
This guide gives the bot names from each tool's own page, the exact lines for a Shopify store, what blocking changes, and the Shopify apps that block bots.
The SEO-tool bots and the names to use
An SEO-tool bot is a crawler run by a company that sells SEO data. A crawler is a program that visits pages on its own. Each one sends a name with its visit, called a user agent, and reads the robots.txt rules written for that name.
Three of the four tools here run two kinds of crawler. One builds the tool's big index of the web. The other runs audits of sites that the tool's users ask it to check.
| Tool | Name to use in robots.txt | What it collects | What the owner says about robots.txt |
|---|---|---|---|
| Ahrefs | AhrefsBot | Ahrefs' web database, and the Yep search engine | Obeys it |
| Ahrefs | AhrefsSiteAudit | Ahrefs Site Audit reports | Obeys it by default. A verified site owner can let it ignore robots.txt on their own site |
| Semrush | SemrushBot | Backlink Analytics, Semrush's "webgraph of links" | Gives the rule to stop it |
| Semrush | SiteAuditBot | Semrush Site Audit | Has its own rule |
| Moz | dotbot | Moz's link index (Link Explorer and the Links API) | "We always respect" robots.txt |
| Moz | rogerbot | Moz Pro site crawls for your own campaigns | "Built to obey robots.txt files" |
| Majestic | MJ12bot | Majestic's backlink index | "Adheres to the robots.txt standard" |
Sources: Ahrefs Bots, SemrushBot, Moz's Dotbot and Rogerbot pages, and MJ12bot, all read on 3 November 2026.
Semrush lists more names for its other tools: SemrushBot-BA (Backlink Audit), SemrushBot-SI (On Page SEO Checker), SemrushBot-SWA (its SWA tool), SplitSignalBot, SemrushBot-OCOB (Content Toolkit), SemrushBot-FT (Plagiarism Checker), RyteBot and SemrushBot-ESI. Semrush's page gives each one its own rule. So a rule for SemrushBot alone doesn't name them.
What blocking them changes, and what it doesn't
Blocking an SEO-tool bot keeps that tool's crawler off your own pages. It doesn't hide who links to you, it doesn't change how Googlebot reads your store, and it can switch off your own audits if you block the audit crawler too. Here is each point, with the source.
Your pages leave the tool's crawl. The tool stops reading your product pages, your text and the links on your pages. So the data that competitors see about your own pages in that tool stops being updated.
Your backlinks stay visible. A backlink is a link to your store from another website. Link indexes are built from the pages a crawler visits. Semrush says that when its bot visits a page, "it saves hyperlinks from the page for further crawling." Moz says finding backlinks to your site depends on "crawlability of the referring pages". The links that point to you sit on other sites. A rule on your store can't stop a tool from reading them there.
Your own audits stop, if you block the audit crawler. Ahrefs Site Audit uses AhrefsSiteAudit. Semrush Site Audit uses SiteAuditBot. Moz Pro site crawls use rogerbot. Block those and the tool can't audit your store for you. Ahrefs lets a verified site owner allow its audit crawler to ignore robots.txt on their own site.
Googlebot doesn't follow rules written for other bots. Google's robots.txt guide says "Only one group is valid for a particular crawler," and "Other groups are ignored." So a rule for AhrefsBot is not a rule for Googlebot. One side effect: AhrefsBot also feeds Yep, Ahrefs' search engine, so blocking it can keep your pages out of Yep.
You can slow a bot down instead. If the problem is how often a bot visits, a Crawl-delay line asks it to wait between pages. Ahrefs, Semrush, Moz and Majestic all describe it on their pages. Semrush caps the wait at 10 seconds and Majestic at 20. Google doesn't support Crawl-delay, so it doesn't change Googlebot.
Should I block Semrush bot?
Block SemrushBot if you don't use Semrush and don't want your pages in its link data. The rule doesn't touch Googlebot. If you run Semrush Site Audit on your own store, leave SiteAuditBot allowed, or your audit stops. Either way, blocking won't hide the sites that link to you.
How to block AhrefsBot on Shopify with robots.txt.liquid
Shopify gives every store a default robots.txt file. To change it, you add a robots.txt.liquid template to your theme and add your own rules below Shopify's default ones.
Steps, from Shopify's Help Center:
- Open
yourstore.com/robots.txtin your browser and save a copy of what it shows. Shopify's developer guide asks you to do this first, so you can compare later. - In your Shopify admin, go to Online Store.
- For your live theme, open the … menu and click Edit code.
- Click Add a new template, then select robots.
- Click Create template. The new file starts with Shopify's default template.
- Add your rules as shown next: one small part inside Shopify's code, the rest below it.
- Save the file in your published theme.
The lines to add: index crawlers only
This set keeps the four big link indexes off your store, and leaves the audit crawlers alone, so you can still audit your own store. Shopify's default file already has groups for AhrefsBot, AhrefsSiteAudit and MJ12bot. You can see them at yourstore.com/robots.txt. Shopify's developer guide says to add a rule to a bot that already has a group inside Shopify's Liquid loop, and to add a new group only for a bot that isn't there. The code below does both. Only the if block inside the loop and the groups after it are new.
{% for group in robots.default_groups %}
{{- group.user_agent }}
{%- for rule in group.rules -%}
{{ rule }}
{%- endfor -%}
{%- if group.user_agent.value == 'AhrefsBot' or group.user_agent.value == 'MJ12bot' -%}
{{ 'Disallow: /' }}
{%- endif -%}
{%- if group.sitemap != blank -%}
{{ group.sitemap }}
{%- endif -%}
{% endfor %}
User-agent: SemrushBot
Disallow: /
User-agent: dotbot
Disallow: /
To block only Ahrefs, keep only group.user_agent.value == 'AhrefsBot' in the if line and drop the groups below the loop. To block only the Moz bot, remove the if block, keep just the dotbot group, and add rogerbot too if you don't use Moz Pro.
The lines to add: audit crawlers too
If you don't use these tools on your own store, block them too. AhrefsSiteAudit already has a group in Shopify's file, so add or group.user_agent.value == 'AhrefsSiteAudit' to the if line above. Then add these groups below the others:
User-agent: SiteAuditBot
Disallow: /
User-agent: rogerbot
Disallow: /
User-agent: SemrushBot-BA
Disallow: /
User-agent: SemrushBot-SI
Disallow: /
Semrush's page has the same two-line rule for its other names, such as SemrushBot-SWA and SplitSignalBot. Add them the same way if you want them gone.
We give each bot its own group, with one User-agent line. Google notes that each crawler "might interpret the rules differently", so the simplest form is the safest.
Check that it worked
Open yourstore.com/robots.txt again. Disallow: / should now show under Shopify's AhrefsBot and MJ12bot groups, and your new groups should appear after Shopify's default rules. Ahrefs' bot page also has a status check that shows whether its bots can crawl your site.
Two more things to know:
- The template lives in your theme. Shopify notes that uploading a theme from the Themes section of Shopify admin "won't import robots.txt.liquid". If you publish a different theme, add the template there too.
- Errors mean no change. Ahrefs says that if your robots.txt contains errors, its bots "will continue crawling your website the way they did before."
robots.txt is a request, not a lock
A robots.txt rule asks a bot to stay away. It can't make it. Google says so plainly: "The instructions in robots.txt files cannot enforce crawler behavior to your site; it's up to the crawler to obey them." Shopify calls the rules "directional and advisory". The SEO tools above say their bots obey the file, so it works for them. A program that only uses their name may not.
It also takes time. Shopify says "Changes are instant, but crawlers don't always react immediately." Each tool gives its own timing:
| Bot | When it sees your new rule |
|---|---|
| AhrefsBot | "May need some time", before its next scheduled crawl |
| SemrushBot | "Up to one hour or 100 requests" |
| dotbot (Moz) | Only at the start of its next index crawl of your site |
Semrush and Majestic both ask you not to block their bots by IP address, because their bots don't use one fixed block of addresses. robots.txt is the method they support.
Shopify apps that block bots, compared
Some Shopify apps block bots on your storefront. We read the listing of each app below on the Shopify App Store on 3 November 2026. Prices are monthly, in US dollars, as listed on 3 November 2026. You're billed in your local currency, so check the listing before you install.
We build one of these apps, Zonify, so read this with that in mind. One more thing first: no listing we read names AhrefsBot, Semrush, Moz or Majestic, Zonify's included. The table shows what each listing does say.
| App | Plan that lists bot blocking | Price (as listed, 3 Nov 2026) | What the listing says |
|---|---|---|---|
| Zonify | Every feature, no plans | Free | Not on the listing (see the notes below) |
| MIDA Fraud Filter, Bot Blocker | Free · Unlimited | Free · $19.00 | Free: "Block bots & crawlers". Unlimited: "Block by referral URL & user agent" |
| Blockify Fraud Filter, Blocker | Premium · Enterprise | $9.99 · $29.99 | Premium: "Auto-block VPN/Proxy/Spam bot". Enterprise: "Block ISP/referrer URLs/User agents" |
| BM Bot blocker Country blocker | Premium, or pay as you go | $3.99, or $0.20 per 100 views after the first 500, capped at $4 | "Bot, Crawler, Proxy & VPN blocker" |
| Armex Fraud Filter bot blocker | Essentials (no free plan) | $9.99 | "Block countries, IPs, ISPs/ASNs, URLs, User-Agents, and referrers" |
| Kedra Fraud Filter, IP Blocker | Basic, Grow or Advanced, by your Shopify plan | $7.99 to $22.99 | "VPN, Proxy & Bot detection" |
| Dakaas Fraud, IP & Bot Blocker | Legend | $8.99 | "Bot blocker and Spy blocker" |
| Securify: IP & Country Blocker | Pro · Growth | $19.00 · $49.00 | Pro: "Manage good bots & search crawlers". Growth: "AI-powered advanced bot blocking" |
| Blocky Fraud Filter IP Blocker | Pro | $19.99 | "Bot Killer: Tor, VPN & proxy bot blocker" |
| Anti Bot: Spam Bot Blocker | Pro | $9.99 | "Spam bot blocker" |
For prices, free plans, VPN and copy protection side by side, see Zonify vs other Shopify blocker apps.
Notes on each app
Zonify is the app we build. It's free forever: every feature, for every store, no plans. Zonify labels the bots that run the storefront script, keeps them out of visit numbers, and shows them on their own page. Ahrefs, Semrush, Moz and Majestic are in its SEO tools type. You choose which bot types to block; nothing is blocked by default. Search engines, ad checkers, link previews and uptime checkers can't be blocked, and a verified bot is never blocked by type. The SEO tools switch covers the whole type, so it blocks your own SEO audits too.
The limit matters a lot for this kind of bot. Zonify can't see bots that never run JavaScript. Ahrefs says its bots render some pages, which means they run the page's scripts. A crawl that only downloads your page's code never reaches Zonify's check. Also, on a first visit the store page can show for about a second before Zonify replaces it, so a bot that reads the code at once already has your links. For SEO-tool bots, robots.txt does the main job. Zonify shows you which of them run your pages, and can turn those away. The full setup is in how to block bots on Shopify.
Apps with user-agent rules: Blockify Enterprise, MIDA Unlimited and Armex. A user-agent rule matches the name a bot sends. That is the kind of rule that could target AhrefsBot by name. None of these listings says so, so ask the developer before you pay.
MIDA is the only app in the table whose free plan lists bot blocking: "Block bots & crawlers". The listing doesn't say which crawlers.
BM has the lowest paid price in the table, and its listing names crawlers: "Bot, Crawler, Proxy & VPN blocker".
Armex is built around bots. Its listing says it can "stop suspicious traffic before it reaches Shopify". That is something an app running inside your theme can't do, Zonify included.
Kedra, Dakaas, Securify, Blocky and Anti Bot list bot blocking or bot detection on paid plans, often together with VPN or proxy blocking. Their listings don't name SEO tools.
Where paid apps do more: user-agent rules, VPN and proxy blocking, checkout rules, and in Armex's case blocking before the request reaches Shopify. For more on these apps' country and IP features, see the best country blocker apps for Shopify (prices there were read in October 2026).
Which way fits your store
Pick the row that matches what you want.
| Your situation | What to do |
|---|---|
| An Indian jewellery store that uses no SEO tool and wants its pages out of their data | Add the index-crawler rules and the audit-crawler rules to robots.txt.liquid |
| A UK homeware shop that runs a Semrush or Ahrefs audit every week | Add the index-crawler rules only. Leave SiteAuditBot, AhrefsSiteAudit and rogerbot allowed |
| An Australian store where SEO bots load pages too often | Shopify's default file already asks AhrefsBot and MJ12bot to wait 10 seconds. For another bot, add a Crawl-delay line instead of Disallow |
| You want competitors not to see your backlinks | Not possible from your store. Those links are on other sites |
| You want to see which SEO tools reach your store's pages | Use an app that labels bots, such as Zonify's bot blocker, and keep its limits in mind |
| You worry about your Google ranking | Leave Googlebot and the * group alone. Rules for SEO-tool bots don't apply to it |
The short version
- On Shopify, block AhrefsBot and other SEO-tool bots with the
robots.txt.liquidtheme template. There's no .htaccess. - Use the names from each tool's own page:
AhrefsBot,SemrushBot,dotbot,MJ12botfor the link indexes, andAhrefsSiteAudit,SiteAuditBot,rogerbotfor audits. - Keep the audit crawlers allowed if you audit your own store.
- Blocking hides your pages from the tool, not your backlinks, and it doesn't change how Googlebot reads your store.
- robots.txt is a request. The big SEO tools say they obey it, but each takes some time to notice.
- Apps can label and block some bots, but none of the listings we read names these SEO tools, and a theme app can't see bots that never run JavaScript.
Worried about bots that use Google's name instead? Read fake Googlebot: how to spot bots pretending to be Google.



