Digital Handshake Media "Book call now" badge

Sauce · Fundamentals

Your site loads fine for people. Google might see a blank page.

Omar Alocozy·Digital Handshake Media·6 min read

Quick answer

Google reads your page in two steps. First it grabs the raw HTML. Later, on a second pass, it runs the JavaScript and looks again. That second pass is slower, it can be delayed for days, and it is not promised. If your main text, your links, and your menu only show up after JavaScript runs, the first pass can see almost nothing. The fix is to put the important content and links in the HTML that arrives before any script runs.

Is your trade still open in your city?We take one client per trade, per city. The call starts with that check, not a pitch.

Book a free assessment

You open the site. It looks great. The text is there, the menu works, the photos load. So it must be fine for Google too.

Not always. A browser and Google's crawler do not read a page the same way. Your browser runs every script right away. Google splits the job in two, and the gap between the two halves is where local sites lose pages.

The two passes, in plain terms

Think of it as Google visiting twice.

Pass one: read the HTML

Google fetches the file the server sends back. It reads the text, the headings, and the links that are already written in that file. This happens fast and for every page.

The wait

Pages that need JavaScript go in a queue for rendering. That queue can move in minutes, or it can take days. During the wait, all Google has is whatever was in pass one.

Pass two: render the page

Google loads the page in a stripped-down browser, runs the scripts, and looks again. Now it can see content the scripts added. This pass costs Google more, so it is not guaranteed to finish cleanly every time.

What gets indexed

Google combines what it found in both passes. If pass one was thin and pass two failed or lagged, the page can sit in the index looking almost empty.

How this breaks a local site

Each of these looks normal in a browser. Each can leave pass one with nothing useful.

The server sends back a near-blank file with one <div id="root">. A script then builds the whole page. Pass one sees the blank file. If pass two lags, so does your ranking.
The list of cities and services you serve is drawn by a script after load. If those links are not in the raw HTML, pass one cannot follow them, and the pages behind them may never get found.
Reviews, service details, or the main copy come in through a background fetch after the page opens. A person waits half a second and sees it. Pass one does not wait.
If robots.txt blocks the folder your JavaScript lives in, pass two cannot run the scripts at all. Google then renders a broken page and indexes that.

If the page needs JavaScript to show its own content, you are betting your ranking on a second visit that may not come soon.

Check yours in five minutes

View source, not inspect

Right-click the page and choose "View Page Source." This is the file Google gets in pass one. Search it for a full sentence of your main copy. If the sentence is not there, pass one cannot see it.

Turn JavaScript off and reload

Disable JavaScript for the site in your browser settings and reload. If the page goes blank or the menu vanishes, that is close to what pass one sees.

Use the URL Inspection tool

In Search Console, inspect a page, run a live test, and open "View tested page." Check the rendered HTML and the screenshot. If your content is missing there, pass two is failing.

Confirm scripts are not blocked

Open your robots.txt. Make sure it does not disallow the folders your CSS and JavaScript load from. Google needs to fetch those to render the page.

See where you actually show up first.Before you pay us a dollar, we run a free 49-point geo-grid scan of your service area. You keep the results either way.

Get the free scan

What this does not mean

It does not mean JavaScript is bad. Google does render it, and plenty of fast sites use it well.

It does not mean you need to rebuild the site. The goal is that the important text and links arrive in the first HTML file. Server-side rendering or a static build both do that.

It does not mean small effects matter. A tooltip or an animation loaded by a script is fine. The risk is only when the page's own content and navigation depend on a script to exist.

Omar Alocozy

Founder, Digital Handshake Media · BA Communication (Hons.), Simon Fraser University

Open View Source on your own service page. Search for one full sentence you wrote. If it is not there, that is the page Google is trying to rank.

Does Google run JavaScript?

Yes, on a second pass after it reads the raw HTML. That pass can be delayed for days and is not guaranteed to finish the same way a browser would, so content that only appears after JavaScript runs is at risk.

How do I know if my site has a JavaScript SEO problem?

View the page source, not the inspector, and search for a sentence of your main copy. Then load the page with JavaScript disabled. If your text or menu is missing in either case, your content depends on JavaScript to exist.

Is server-side rendering required for local SEO?

Not required, but it removes the risk. Server-side rendering or a static build puts your text and links in the first HTML file, so Google sees them on the fast first pass instead of waiting for a render.

Can blocking JavaScript files in robots.txt hurt rankings?

Yes. If Google cannot fetch your CSS and JavaScript, it cannot render the page properly on the second pass, and it may index a broken version. Allow the folders those files load from.

Why is my page indexed but showing almost no content?

A common cause is that the raw HTML was nearly empty and the render pass that would have filled it lagged or failed. Putting the real content in the server response fixes this.

Sources

  1. Google Search Central, “Understand the JavaScript SEO basics”, developers.google.com: how Googlebot processes a page in the crawl, render, and index stages.
  2. Google Search Central, “Fix Search-related JavaScript problems”: content added after load, blocked resources, and other patterns that break rendering.
  3. Google Search Central, “Make your links crawlable”: links must be real <a href> tags in the HTML to be followed reliably.
  4. Google Search Central, “Google Search Essentials”: the baseline requirements for a page to appear in Search.

Next step

Find out whether your trade is still open in your city

One client per trade, per city. The call starts with that check, not a pitch.