What does Google say about SEO? /
Quick SEO Quiz

Test your SEO knowledge in 3 questions

Less than 30 seconds. Find out how much you really know about Google search.

🕒 ~30s 🎯 3 questions 📚 SEO Google

Official statement

When a site uses AJAX calls to load content, these resources can be indexed but do not affect the crawl budget. Use the HTTP X-Robots-Tag headers to prevent their indexing without impacting the rendering of the main page.
42:45
🎥 Source video

Extracted from a Google Search Central video

⏱ 58:00 💬 EN 📅 28/04/2020 ✂ 12 statements
Watch on YouTube (42:45) →
Other statements from this video 11
  1. 2:08 Faut-il vraiment bloquer les paramètres de tracking pour Googlebot via cloaking ?
  2. 5:50 Les URLs non-canoniques dans les liens internes tuent-elles vraiment le PageRank ?
  3. 6:01 Vos liens internes sabotent-ils le choix de la canonique par Google ?
  4. 16:22 Faut-il bloquer les paramètres d'URL dans robots.txt pour économiser son budget de crawl ?
  5. 18:03 Googlebot peut-il vraiment exécuter vos requêtes AJAX et indexer le contenu chargé en JavaScript ?
  6. 21:16 Les sitelinks search box sont-ils vraiment sous contrôle du SEO ?
  7. 21:50 Le balisage FAQ garantit-il vraiment un affichage dans les résultats de recherche Google ?
  8. 22:23 Googlebot soumet-il vos formulaires et faut-il s'en inquiéter ?
  9. 24:06 Faut-il vraiment rediriger tous ses ccTLDs vers un domaine unique ?
  10. 26:08 Faut-il vraiment passer d'un .com à un .ca pour cibler uniquement le Canada ?
  11. 51:44 Faut-il vraiment se méfier de l'attribut noreferrer sur vos liens ?
📅
Official statement from (6 years ago)
TL;DR

Google claims that resources loaded via AJAX can be indexed but do not consume crawl budget. To prevent their indexing without breaking the rendering, simply use the HTTP header X-Robots-Tag. The real question is whether this assertion holds true in all contexts—especially on heavy sites where every request counts.

What you need to understand

Why is there a distinction between indexing and crawl budget?

Google distinguishes between two processes: crawling (exploring URLs) and indexing (recording content). AJAX calls often trigger requests to JSON or XML endpoints that return raw data.

These endpoints can end up indexed if Googlebot discovers them and no directive prevents it. However, Martin Splitt clarifies that they do not impact the crawl budget—which implies that Google treats them differently from traditional HTML pages.

How can you block indexing without disrupting rendering?

The X-Robots-Tag header applies at the HTTP level, before the browser or Googlebot even parses the content. Therefore, you can return X-Robots-Tag: noindex on your AJAX endpoints without touching the JavaScript code.

The main page continues to consume these resources for its client-side rendering, but Google does not index the JSON file as such. It’s clean, transparent, and prevents polluting the index with out-of-context data fragments.

What’s the difference with robots.txt or meta robots?

The robots.txt blocks crawling—so Google never retrieves the resource, which can prevent JavaScript rendering from functioning. The meta robots requires that the resource is HTML, which is not the case for a JSON endpoint.

The X-Robots-Tag allows crawling for rendering but stops indexing. This is exactly what’s needed for AJAX calls: Google downloads, executes, but does not archive.

  • AJAX resources can be indexed if no directive prevents it
  • According to Google, they do not consume crawl budget
  • The X-Robots-Tag header blocks indexing without affecting rendering
  • The robots.txt blocks crawling, thus breaking JavaScript—avoid it
  • The meta robots only works on HTML, not on JSON

SEO Expert opinion

Is this claim about crawl budget verifiable?

Google never publishes precise metrics on crawl budget—no quotas, no counters. Therefore, stating that AJAX calls 'do not harm' the budget is a non-falsifiable statement [To verify].

On high-volume sites (e-commerce, aggregators), we observe that multiplying AJAX endpoints can slow down overall crawling. It’s hard to tell if this is a side effect (server latency, JS timeout) or if these resources genuinely consume crawl despite the official statement.

Is the X-Robots-Tag always enough to prevent indexing?

Yes, provided that your server correctly sends the header on each HTTP response. If you go through a poorly configured CDN or reverse proxy, the header may be lost—and your endpoints end up indexed.

Another trap: if your endpoint returns HTML instead of JSON (wrong route, dev error), the X-Robots-Tag remains valid but you end up with ghost pages in the index. Always check the Content-Type alongside.

Should you always block indexing of AJAX endpoints?

Not always. If your endpoint returns useful structured content (e.g., a public API, product schema data), indexing it can make sense—especially if you want to appear in specific searches.

However, in 90% of cases, indexing a raw JSON file is counterproductive: zero semantic context, no user experience, and index pollution. Let’s be honest: if you don’t know why you would want to index an endpoint, block it by default.

Warning: On headless or hybrid SSR architectures, some AJAX endpoints serve both client rendering and server pre-rendering. Blocking their indexing can create inconsistencies between what Googlebot sees on the server side and the client side. Test in Search Console before deploying.

Practical impact and recommendations

How can you detect incorrectly indexed AJAX endpoints?

Use the command site:yourdomain.com filetype:json in Google (or filetype:xml for XML endpoints). You’ll immediately see if any data files are indexed.

Additionally, inspect your server logs to spot Googlebot requests to /api/, /ajax/, /data/ routes. If these routes are not meant to be public, check that they properly return the X-Robots-Tag.

What is the proper server configuration to block indexing?

On Apache, add this to your .htaccess or vhost configuration:
<FilesMatch "\.(json|xml)$">
Header set X-Robots-Tag "noindex"
</FilesMatch>

On Nginx, in the relevant location block:
location ~* \.(json|xml)$ {
add_header X-Robots-Tag "noindex";
}

On modern frameworks (Next.js, Nuxt, etc.), configure the header directly in the API middlewares to ensure it is returned with each response, regardless of HTTP status.

What mistakes should you absolutely avoid?

Never block AJAX endpoints in robots.txt if your JavaScript relies on them for rendering. Google will crawl the page, try to execute the JS, fail to retrieve the data, and leave you with incomplete rendering.

Avoid mixing X-Robots-Tag: noindex and X-Robots-Tag: nofollow on the same resource without a clear reason. Nofollow only makes sense if your JSON contains links—which is rare. A noindex alone suffices in 99% of cases.

  • Audit your site with site:yourdomain.com filetype:json to detect indexing leaks
  • Implement the X-Robots-Tag on all AJAX endpoints that should not be indexed
  • Check that the header is returned properly (curl -I or DevTools Network)
  • Never block these resources in robots.txt if JS consumes them
  • Test rendering in Search Console after modification to avoid regressions
  • Document the configuration in your runbook to ensure the dev team doesn’t break it during refactoring
The indexing of AJAX calls is a frequent blind spot in technical SEO. The X-Robots-Tag solves the problem neatly, without disrupting client-side rendering. However, in complex architectures (SPA, hybrid SSR, API gateway), these configurations can quickly become fragile—especially if multiple teams touch the code. If your technical setup is already tight or if you lack resources for finely auditing each endpoint, hiring a specialized SEO agency can save you months of debugging and lost positions on strategic pages.

❓ Frequently Asked Questions

Est-ce que bloquer l'indexation des endpoints AJAX peut nuire au référencement de la page principale ?
Non, si tu utilises le X-Robots-Tag. La ressource reste crawlable pour le rendu JavaScript, mais n'est pas indexée en tant que page distincte. Le contenu final affiché sur la page principale reste indexable normalement.
Faut-il aussi bloquer les endpoints AJAX en HTTPS si le site est en HTTP ?
Si ton site sert du contenu mixte (HTTP/HTTPS), applique la même règle sur les deux protocoles. Googlebot peut découvrir les endpoints via les deux schémas — mieux vaut unifier la config.
Le X-Robots-Tag fonctionne-t-il sur tous les types de fichiers retournés par AJAX ?
Oui, il s'applique à n'importe quel type MIME : JSON, XML, HTML, texte brut, images. L'en-tête HTTP est interprété avant le parsing du contenu.
Google peut-il quand même indexer un endpoint si le X-Robots-Tag est mal formaté ?
Oui. Si l'en-tête contient une faute de syntaxe ou est renvoyé après une redirection non suivie, Google peut ignorer la directive et indexer la ressource. Vérifie toujours avec curl -I.
Les autres moteurs de recherche respectent-ils le X-Robots-Tag sur les endpoints AJAX ?
Bing et Yandex supportent X-Robots-Tag, mais leur capacité à exécuter du JavaScript reste en retrait par rapport à Google. Si ton contenu dépend d'AJAX, le rendu peut être incomplet sur ces moteurs même avec la bonne config.
🏷 Related Topics
Domain Age & History Content Crawl & Indexing HTTPS & Security AI & SEO JavaScript & Technical SEO

🎥 From the same video 11

Other SEO insights extracted from this same Google Search Central video · duration 58 min · published on 28/04/2020

🎥 Watch the full video on YouTube →

Related statements

💬 Comments (0)

Be the first to comment.

2000 characters remaining
🔔

Get real-time analysis of the latest Google SEO declarations

Be the first to know every time a new official Google statement drops — with full expert analysis.

No spam. Unsubscribe in one click.