To stop Ahrefs from crawling certain pages, you can add URL restrictions to your website's robots.txt file or exclude those pages through Ahrefs Site Audit settings. The method you need depends on whether you want to restrict AhrefsBot's regular crawling or prevent specific URLs from appearing in a Site Audit crawl.

Ahrefs uses two separate crawlers: AhrefsBot, which collects website data for its database and AhrefsSiteAudit, which examines pages during technical audits. You can restrict either crawler without blocking Google or other search engines, provided you configure the rules correctly.

Block Specific Pages From Ahrefs in Robots.txt

AhrefsBot follows robots.txt instructions, allowing website owners to exclude individual pages or entire directories from its crawling. You can make these changes directly on your website without needing an Ahrefs account.

Step 1: Open your robots.txt file

Open your website's robots.txt file by visiting https://example.com/robots.txt, replacing the example domain with your own. If you manage your website through a hosting control panel, you can usually find the file inside the website's root directory.

Before editing, review the existing rules and save a backup. You should preserve instructions for other crawlers and any restrictions your website already uses.

Step 2: Add rules for the pages you want Ahrefs to skip

Suppose your website contains an /internal/ directory and an old report at /reports/old-report.html. You want AhrefsBot to stop accessing these URLs while continuing to crawl the rest of your public website.

Add the following instructions to robots.txt:

User-agent: AhrefsBot
Disallow: /internal/
Disallow: /reports/old-report.html

The first restriction tells AhrefsBot not to crawl URLs inside /internal/, including any subdirectories. The second prevents crawling of URLs beginning with /reports/old-report.html, without restricting unrelated report pages.

For individual pages, make sure the path is sufficiently specific. Robots.txt uses prefix matching, so a restriction targeting /reports/old-report could also affect another page named /reports/old-report-2026.html.

Step 3: Restrict AhrefsSiteAudit if necessary

Blocking AhrefsBot does not automatically prevent AhrefsSiteAudit from visiting the same pages. If you want both crawlers to avoid those URLs, specify their restrictions separately.

Your configuration would look like this:

User-agent: AhrefsBot
Disallow: /internal/
Disallow: /reports/old-report.html

User-agent: AhrefsSiteAudit
Disallow: /internal/
Disallow: /reports/old-report.html

Both crawlers should now follow the specified restrictions under their normal robots.txt behaviour. However, Ahrefs allows verified website owners to configure Site Audit to ignore robots.txt, which is why you should also check your audit settings if requests continue.

Important: If your existing robots.txt file has a User-agent: * group, review its restrictions before adding an Ahrefs-specific group. Crawlers following standard robots.txt group selection generally use their matching specific group instead of combining it with the general group.

For example, if your general group disallows /admin/, include that restriction in the Ahrefs-specific group as well if it must remain blocked. Otherwise, adding a specific group could unintentionally permit crawling of paths previously restricted by the general rules.

Exclude Pages From Ahrefs Site Audit

If you only want to stop Ahrefs Site Audit from examining particular pages, you can configure URL exclusions without changing your website's robots.txt file. This is useful when an audit repeatedly includes archived pages, unnecessary directories or URLs outside the scope of your intended checks.

Step 1: Open the project's crawl settings

Sign in to Ahrefs and select the website project you want to modify. Navigate to Project Settings → Site Audit → Crawl Settings, then locate the section labelled Include and exclude URLs.

Find the field named Don't crawl URLs matching the pattern. This setting allows you to specify which URLs AhrefsSiteAudit should skip during its next crawl.

Step 2: Enter the pages or directories you want excluded

Suppose you want to exclude all pages inside /reports/archive/. You can enter the following pattern:

^https://example\.com/reports/archive(/|$)

This matches the archive directory and URLs beneath it on the specified domain. It does not match unrelated directories such as /reports/archive-old/, making it more precise than a broad text-matching pattern.

If you only want to exclude an individual page, such as /reports/old-report.html, use:

^https://example\.com/reports/old-report\.html(\?.*)?$

This matches the specified page, including versions with URL query parameters, without also excluding similarly named pages. Replace example.com with your actual domain and adjust the expression if your website uses a www hostname.

Ahrefs Site Audit uses regular expressions (RE2) for these settings, unlike the path-based rules in robots.txt. You can enter multiple exclusion patterns but each must be valid because Ahrefs ignores invalid regular expressions.

Step 3: Save the exclusions and start a new crawl

Save your changes and start another Site Audit crawl to apply the exclusions. Ahrefs does not apply newly saved crawl settings retroactively to completed or already-running audits.

After the new crawl finishes, inspect its results to confirm that the excluded URLs were not fetched. Remember that these exclusions affect the Site Audit project; they do not stop AhrefsBot from crawling the same URLs for Ahrefs' general database.

Why Ahrefs Still Crawls Blocked Pages

If Ahrefs continues requesting restricted URLs, the first thing to examine is the crawler's identity. A correctly configured AhrefsBot restriction may appear ineffective if the requests actually come from AhrefsSiteAudit.

Check your server access logs for the user-agent associated with the requests. If they identify AhrefsSiteAudit, verify that you've restricted that crawler separately or excluded the URLs through the project's crawl settings.

Check whether Site Audit is ignoring robots.txt. Verified website owners can enable an Ahrefs setting that allows Site Audit to disregard robots.txt restrictions. Open the project's crawl settings, find Robots instructions, and ensure the option to ignore robots.txt is disabled if you want those restrictions enforced.

Confirm that the live robots.txt file contains your changes. Open the file in a browser and check that the rules appear under the intended user-agent group. If your hosting provider or CDN caches robots.txt, make sure the public version has been updated.

Also check that the rules belong to the correct hostname. A robots.txt file on example.com does not automatically control crawling on shop.example.com, so each host may require its own configuration.

Allow AhrefsBot time to recognize the changes. Ahrefs states that its crawler may not apply updated robots.txt instructions immediately because it needs to retrieve the modified file. If the rules are correct but requests continue shortly after an update, check subsequent activity rather than assuming the configuration has failed.

For Site Audit exclusions, inspect the regular expressions and verify that they match the actual URLs. A pattern targeting https://example.com/ will not necessarily match https://www.example.com/ and Ahrefs may ignore an invalid expression entirely.

Verify That Ahrefs Has Stopped Crawling

Once you've updated robots.txt, you can use Ahrefs' official bot checker to examine whether its crawler can access your website. Check the restricted URL rather than only the homepage, since your goal is to block selected pages while leaving other content accessible.

For a more reliable check of actual activity, examine your server access logs after Ahrefs has had time to process the new instructions. Look for requests to the restricted paths and compare their user-agent information with the rules you've configured.

If you've excluded URLs through Site Audit, run a fresh crawl and check whether those pages were fetched. Previously completed reports may still display the URLs but that doesn't establish that the crawler accessed them again.

Once the correct crawler is following your restrictions and the selected pages are no longer being fetched, the configuration is working as intended. You can leave the remaining website pages available for Ahrefs without applying a sitewide block.