Check robots.txt and noindex rules before migration

Check robots.txt and noindex rules before migration

Last updated: November 13, 2026

Quick Answer: In this How to check robots.txt and noindex rules before an AI search site migration guide, a full page-by-page review is the most reliable check before launch, especially on high-value URLs. robots.txt and noindex rules can stop search engine crawlers from seeing your new site during an AI search migration. Check both before launch, or you can hide pages you meant to move. The steps below show how to catch blocked crawling, blocked indexing, and staging mistakes before they become a launch problem.

What you need to check before the migration goes live

A single stray line can derail the handoff. One noindex tag, one robots.txt rule, and the whole plan wobbles.

You’re about to switch a staging site to the live domain, and a leftover setting can keep key pages out of search. The fix is to audit robots.txt, noindex meta tags, staging access, and xml sitemap rules before the cutover.

Key takeaways

  • robots.txt controls crawl access, not index rules by itself.
  • noindex meta tags tell search engines not to index a page, even if they can crawl it.
  • staging sites often carry accidental blocks that should never reach production.
  • xml sitemaps should list the pages you want crawled, not the pages you want hidden.
  • A page-by-page review is a safer check than relying on the homepage alone.

A clean pre-migration pass usually covers four things:

  1. The live domain’s robots.txt does not block important folders or file paths.
  2. The staging site is blocked from public indexing, but not in a way that confuses production rules.
  3. Pages that need indexing do not carry noindex tags or HTTP header rules.
  4. The xml sitemap matches the final URLs that should be discovered after launch.

Many teams only look at one layer. That is a gamble.

How do robots.txt and noindex rules differ?

robots.txt decides whether crawlers may request a URL; noindex decides whether a crawled page can enter the index. That split matters because a page can be crawlable and still stay out of search, or be blocked from crawling and never reach the point where a noindex tag is seen.

You’re looking at a staging page in the browser, and the bot sees a different set of instructions. Human eyes say one thing; crawler rules say another. Under five minutes, the checklist can go sideways.

Use this split:

  • robots.txt is for crawl access.
  • noindex meta tags are for indexation.
  • Search engine crawlers need access to see a noindex rule on the page itself.
  • xml sitemap helps discovery, but it does not override either rule.

A common mistake is blocking a page in robots.txt and expecting search engines to read the noindex tag on that page. If crawling is blocked first, the crawler may never see the noindex instruction. Old or test URLs can linger because of that.

For a reference point, the Google Search Central documentation on robots.txt and noindex is the clearest public explanation of the split:

  • Google Search Central: robots.txt overview
  • Google Search Central: noindex rules

Check the live robots.txt file before launch

Open the live robots.txt file in a browser before launch and compare it line by line with the final crawl plan. Look for rules that block the wrong folders, block CSS or JS files, or still mention staging paths from an earlier deployment.

One Disallow line can look harmless and still wipe out an entire content section. That kind of mistake is sneaky; it hides in plain text.

Here’s the core procedure:

  1. Open https://yourdomain.com/robots.txt and save a copy of the current file.
  2. Check every Disallow line against the final URL map, especially blog folders, category folders, and parameter paths.
  3. Confirm that no staging hostnames, temporary directories, or test subfolders remain in the file.
  4. Look for blocked asset paths such as CSS, JS, or image directories that search bots need to render pages properly.
  5. Compare the file with the xml sitemap location listed in the same file, if one is declared.
  6. Run a robots.txt test in your search platform’s inspector tool, if available, to see whether key URLs are allowed or blocked.

First pass: does the file allow the pages you want discovered after migration? If not, fix that before anything else. A migration with a bad robots.txt can look healthy in a browser and still fail in crawl systems.

Common mistakes here:

  • Blocking whole directories because one old test page lived inside them.
  • Forgetting that file paths can be case-sensitive on some servers.
  • Leaving a disallow rule for a staging subdomain after the DNS switch.
  • Blocking JS or CSS and then wondering why rendered pages look thin or broken in search.

On the flip side, do not open everything just to be safe. That creates crawl noise and can expose low-value internal paths.

Which noindex tags should be removed or kept?

Remove noindex from pages that should be indexed after launch, and keep it only on pages that are meant to stay out of search. The rule needs to be checked in the HTML, in HTTP headers, and in any CMS settings that inject it automatically.

A migrated page can look perfect in the browser while the source still carries a noindex tag from staging. That is a rough trade on launch day.

Check these places:

  • <meta name="robots" content="noindex"> in the page source
  • X-Robots-Tag: noindex in the response header
  • CMS-level settings that add noindex to templates or whole sections
  • Plugin or theme options that apply noindex sitewide

The best practice is to search the staging source for the exact string noindex before launch. Then check at least a sample of high-value URLs after the deployment is staged but before DNS flips. That catches template-level rules that can affect hundreds of pages at once.

A page can also be blocked by a more specific rule, such as noindex, nofollow. That still keeps it out of the index. If the page is meant to rank, the final live version should not send that signal.

Who Should Skip This: Teams that have not finished the URL map for the migration should not remove noindex yet on every page; they should finish the redirect and page inventory first.
Buy this if: you manage a live content site and need pages indexed after cutover.
Skip this if: you are still using noindex to hide unfinished staging pages and have not separated them from production.

What should be checked on a staging site before launch?

Staging deserves a careful look because most migration mistakes start there. Password protection, IP restrictions, robots.txt blocks, and noindex tags often sit together; if nobody audits them, they can leak into production.

You open the staging domain and see content, but search bots hit a wall of restrictions. Fine for testing. Toxic on a live site.

Use this staging checklist:

  • Confirm the staging host is not listed in the production xml sitemap.
  • Check whether staging pages carry noindex in meta tags or headers.
  • Make sure staging robots.txt blocks crawlers intentionally, not by accident on the live host.
  • Verify that canonical tags point where they should, especially if staging copied live templates.
  • Check that password walls, IP blocks, or basic auth are not active on the live destination after launch.

The safest setup hides test pages from search while leaving production clean and indexable. Different jobs. Same CMS, if you are not careful, can blur that line.

If the staging site uses the same CMS as production, look for global settings that apply to both environments. A single checkbox in a template or plugin can carry over a noindex rule to every page on the new domain. That is a small mistake with a large blast radius.

How should the xml sitemap fit into the crawl check?

The xml sitemap should list the pages you want search engines to discover, and those URLs should not be blocked by robots.txt or marked noindex. A sitemap does not force indexing, but it does tell crawlers where the final URLs are supposed to live.

The sitemap is supposed to speak plainly. If it lists old staging URLs or pages meant to stay hidden, the signals get muddy fast.

Check the sitemap for:

  • Final production URLs only
  • No staging hostnames
  • No blocked parameter URLs
  • No pages with noindex
  • No old legacy paths that no longer resolve

The sitemap and robots.txt should tell the same story. If the sitemap includes a URL, robots.txt should not block it. If a page should stay out of the index, do not list it in the sitemap as if it belongs there.

This is also where you catch resource issues. If your theme or layout depends on assets from a folder that robots.txt blocks, the page may render poorly for crawlers. Search systems often judge the rendered page, not just the raw HTML.

A practical pre-launch checklist for site migrations

Use a short, repeatable checklist 24 to 48 hours before launch, then again after the switch. That second pass matters because deployments often reapply old settings when templates, plugins, or environment configs move from staging to production.

You already reviewed the plan once. Then a cached robots file or inherited noindex rule shows up on the live host. A second pass catches that regression in minutes, not days.

Check these items in order:

  1. Open the live robots.txt and confirm it allows the intended sections.
  2. Review the staging robots.txt and make sure its blocks are not copied to production.
  3. Search the page source for noindex on templates, key landing pages, and category pages.
  4. Check response headers for X-Robots-Tag on PDFs, feeds, or special file types.
  5. Review the xml sitemap for only final production URLs.
  6. Compare a sample of important URLs against the crawl plan and redirect plan.
  7. Load a few pages in a crawler or search inspector tool and confirm they are allowed to be crawled.
  8. Recheck after launch to catch cache, CDN, or deployment drift.

The hidden issue is often not the main page. It is a file type, a template, or a subfolder that inherited a rule from the old site. That is why a page-by-page check still beats a broad assumption.

For the bigger migration workflow, this page sits alongside the site migrations and redesigns hub. That hub can show the surrounding process; this page keeps the access-control piece tight.

Common mistakes that block discovery after migration

The most common mistake is assuming a visible page is also crawlable and indexable. A browser can load a page that search systems still cannot use, and that gap is where migration checks fail.

Your homepage loads, the navigation works, and the live site looks normal. Then a noindex tag in the template turns up, or a robots rule hides the whole content folder. If the team only checks design, this slips right through.

Watch for these failures:

  • Leftover staging noindex that hides production pages.
  • Robots blocks on CSS or JS that reduce rendering quality.
  • Sitemap URLs that don’t match the live domain.
  • Duplicate environment rules carried from staging to production.
  • Blocked folders that contain new landing pages the migration was supposed to promote.

Each one has a cost. Leftover noindex delays discovery. Blocked assets can make pages look thin to crawlers. Bad sitemap entries waste crawl attention on URLs that should not exist.

A better habit is to pair every launch rule with a reason in writing. If a page is blocked, say why. If it is meant to rank, say where the blocking rule was removed. That turns a one-time check into a migration record you can use next time.

FAQ

How do robots.txt changes affect ai search visibility?

robots.txt changes can stop crawlers from reaching pages that AI search systems need to discover. If a page is blocked, it may never be fetched, which means the content, links, and page signals stay hidden. The fix is to allow the pages that should be indexed and keep only intentional exclusions.

When should noindex be removed during a migration?

Noindex should be removed right before launch or at the point when the page is ready to appear in search. If you remove it too early on staging, test pages can leak into discovery; if you remove it too late, the live page can stay out of the index. Check the final source and headers on production, not just staging.

What should be checked on a staging site before launch?

Staging should be checked for accidental index blocks, blocked resources, and any rule that could copy into production. Review robots.txt, noindex tags, X-Robots-Tag headers, canonical tags, and the xml sitemap. If the staging host is password-protected or hidden by IP rules, make sure those controls do not survive the live deployment.

Drafted with AI; not yet reviewed by a person.

Leave a Reply

Your email address will not be published. Required fields are marked *