Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Make important destinations ordinary links: use an <a> element with a working href, and ensure the link is present in the initial HTML when possible. Google can render JavaScript and discover links added that way, but crawling and rendering happen in separate stages, and Google cautions that not every bot runs JavaScript. A link visible in your browser therefore is not proof that every crawler can discover it.

Why a link can work in a browser but remain invisible to a crawler

Your browser runs the site’s JavaScript as it loads, so it may display links that were absent from the server’s original response. Crawlers differ in whether and when they execute that code. Googlebot first fetches a URL, checks whether it is allowed to crawl, and parses links in the response. Eligible pages can then be queued for rendering in a headless Chromium environment; Google parses the rendered HTML for additional links and content. That rendering is a later stage, so discovery can be delayed. Google describes this process in its JavaScript SEO basics.

Google does not say it cannot crawl JavaScript links. It says it can process links injected by JavaScript when they use crawlable markup. The practical risk is depending on a script event, a browser-only interaction, or a crawler’s ability to render when an ordinary URL link would work more broadly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which link patterns are reliable?

Implementation What the crawler receives Practical reliability
Anchor returned in the initial HTML An ordinary <a href="/real/path">...</a> link in the server response. Clearest option: the destination is available before JavaScript rendering.
Anchor inserted by JavaScript A crawlable anchor with an href after rendering. Google can discover it after rendering; this depends on rendering and may take longer.
Click handler, button, or other element without an anchor URL No ordinary anchor-and-URL link for a crawler to parse. Least reliable for link discovery. Provide an anchor with a resolvable href.

Google’s guidance is that it generally crawls a link when it is an <a> element with an href whose value resolves to an actual URL. Its crawlable links documentation also recommends descriptive, concise, relevant anchor text so people and Google can understand the destination.

How to find the links crawlers may be missing

  1. Inspect the initial response. Fetch the page or use your browser’s view-source function, then look for the important link in the returned HTML. Do not rely only on the live Elements or Inspector panel: those show the DOM after scripts may have changed it.
  2. Compare it with the rendered DOM. In browser developer tools, inspect the live page and check whether JavaScript inserts the link. Confirm that the final element is an <a> with an href, not just a clickable element with an event handler.
  3. Test the destination URL. Open the href directly and confirm it resolves to the intended page. Check the destination’s HTTP response and redirects; a link that points to a broken or inaccessible URL will not deliver the intended discovery.
  4. Check rendering and access restrictions. Review robots.txt and server rules for the page, JavaScript, CSS, API endpoints, and destination. Google says blocked pages and resources are not rendered. Also check whether the server returns a successful response: Google queues pages returning HTTP 200 for rendering, while non-200 responses may skip it.
  5. Verify crawler identity before changing rules. User-agent strings can be spoofed. Google recommends validating Googlebot through reverse DNS or by matching the source IP against its published ranges in the Googlebot documentation.

What to change in a JavaScript-heavy site

Use a real anchor for every important destination

Make navigation and other discovery-critical links standard anchors with meaningful URLs and descriptive text. A client-side router can still handle the click, but the page should expose a usable href rather than requiring a crawler to simulate a click on a button or custom element.

Return important links in the initial HTML when practical

If the initial response is only an application shell and the links appear after scripts run, consider server-side rendering or pre-rendering for important pages and navigation. Google recommends these approaches because they can make a site faster for users and crawlers and accommodate bots that cannot run JavaScript. They also reduce reliance on a later rendering stage.

Keep required resources and pages accessible

Check that crawlers are not blocked from the scripts, stylesheets, APIs, and destination pages needed to render or follow a link. A robots.txt allowance is only one part of access: server responses, authentication, firewalls, and IP filtering can also prevent a crawler from fetching a URL. OpenAI specifically advises site owners to allow requests from its published IP ranges as well as to configure robots.txt; see its crawler documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Separate search visibility, model training, and private access

There is no single “AI crawler” switch. OpenAI documents distinct crawler and user-agent roles. For visibility in ChatGPT search, the relevant control is OAI-SearchBot. OpenAI says sites opted out of OAI-SearchBot will not appear in ChatGPT search answers, although they may appear as navigational links. GPTBot is described separately as a crawler for content that may be used to train foundation models. OAI-AdsBot and ChatGPT-User also have distinct described roles. Review OpenAI’s current crawler documentation and its Publishers and Developers FAQ before setting policy; crawler details and published IP ranges can change.

Make the OAI-SearchBot decision based on whether you want ChatGPT search discovery, and make any GPTBot training choice separately. OpenAI says its systems may take approximately 24 hours to adjust after a robots.txt change; that is an operational estimate, not a guarantee of indexing or a ranking result.

Robots.txt is not a way to protect confidential material. Google notes that blocking a URL from crawling does not guarantee that it cannot appear in search results. For private pages, use authentication or another access-control mechanism rather than relying on crawler rules.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What this means for other crawlers

Do not assume that Google’s JavaScript rendering behavior applies to every search or AI crawler. Google explicitly notes that not all bots can run JavaScript. Bing says Bingbot uses a regularly updated rendering engine in its Webmaster Guidelines, but crawler capabilities vary and can change. The available documentation does not establish a universal rule for every AI crawler. Initial-response anchors are the safer implementation when broad discovery matters.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.